or use match in array context:
while(<DATA>) { my @a=/(\w+)/g; print "@a\n"; } __DATA__ word1 word2 word3 .. .. ..
updates: Typo corrected: s/scalar/array/ thanks to AnomalousMonk
Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."
In reply to Re: global regex
by psini
in thread global regex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |