"be consistent" | |
PerlMonks |
Re: Reading contents of file using regexby bart (Canon) |
on Jan 31, 2006 at 11:09 UTC ( [id://526710]=note: print w/replies, xml ) | Need Help?? |
You've got one obvious error, and that maybe due to copying from a HTML page:
should be
Furthermore, it might be a good idea to add the /g flag to your regex in the while condition. That way, it won't try to match again and again from the start, but instead it'll continue next time where it left off last time. Oh, the /o is useless, you don't have a variable in your regex. So I dropped it.
In Section
Seekers of Perl Wisdom
|
|