in reply to Regexp conundrum
This is not likely what you wanted. You probably want to do a foreach loop where it will go through the array one time or shift the lines off one at a time. The reason being is because the array is being tested in scalar context - which for an array is the number of elements it contains. Unless the number of elements reaches 0 - this will loop forever.while(@htmlLines)
Additionally - I don't think
is what you wanted either. You probably want something more like: if (/$pattern1/ && /$pattern2/) once you defined $pattern1 and $pattern2 correctly.if(/$pattern1 && $pattern2/)
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Regexp conundrum
by Tricky (Sexton) on Aug 22, 2003 at 09:38 UTC |