Problems? Is your data what you think it is? | |
PerlMonks |
Re: accumulating rex-exp matches in an arrayby japhy (Canon) |
on Jun 25, 2002 at 18:27 UTC ( [id://177167]=note: print w/replies, xml ) | Need Help?? |
You should never use a regex variable without making sure the regex matched. If a line DIDN'T contain "AAA.n", $1 would retain its value!
Anyway, you want to use the /g modifier:
_____________________________________________________
In Section
Seekers of Perl Wisdom
|
|