in reply to global regex
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."
|
|---|