![]() |
|
P is for Practical | |
PerlMonks |
Re: REGEX malfunctionby si_lence (Deacon) |
on Jul 13, 2009 at 09:13 UTC ( #779505=note: print w/replies, xml ) | Need Help?? |
I agree with jethro: code tags would help.
One thing I do not understand is that it looks as if you are looping through the file, but match against a constant $string. Also you should be using in your code, especially if you're just starting with perl. They do help a lot.
In your code there is one thing (if I read it right): Your variable $string starts with an opening parenthesis, but you anchor your match to start without it. So either change (added quotes around the $string assignment, updated m//) code to or get rid of the outermost pair of parenthesis. cheers, si_lence
In Section
Seekers of Perl Wisdom
|
|