The lookahead operator will keep restarting where the previous match left off.$" = ", "; $string = "a:b:c"; @list = ($string =~ m/(?=(\w):(\w))/g); print "list=@list\n";
-- Randal L. Schwartz, Perl hacker
In reply to •Re: m//g in list context
by merlyn
in thread m//g in list context
by grain_of_sand
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |