On Sun, 27 Feb 2005, Joel Gwynn wrote:
> Most other languages which have regex engines create an array of
> matches. I've been scouring the perl documentation, but can't find
> anything similar. The only way I know how to do it is by the perlvars
> $1, $2 ... etc.
>
> Anyone?
use context e.g.
@matches = 'foo bar baz' =~ /([aeiou])/g;
# @matches = ('o', 'o', 'a', 'a')
Hope this helps,
Mike
--
[EMAIL PROTECTED] | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | GPG PGP Key 1024D/059913DA
| Fingerprint 0570 71CD 6790 7C28 3D60
| 75D2 9EC4 C1C0 0599 13DA
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm