Re: range operator for a condition in 2 steps

Jasper McCrea <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Organization GuideGuide
Message-ID <[email protected]>
"James E. Tilley" wrote:
> 
> Does
> 
>   if (/^BEGIN$/ .. (/^\s*$/ .. /^END$/) =~ /E/)
> 
> do what you want?
> 

Getting rid of the fourth match:

  /^START$/ .. (/^\s*$/ .. /^END$/) && $&

I'm not entirely sure this works for all cases.

Jasper
-- 
I'm not a robot like you. I don't like having disks crammed into me...
Unless they're Oreos, and then only in the mouth.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.