I think in standard code I would prefere the loop - while the s///e is great for golfing.while($content =~ /id=(\d+)/sig){ push(@disp, $1); }
Update: Yeah diotalevi has a better solution using the fact that a match in list context returns a list of matches.
In reply to Re: Using s///e and it just doesn't feel right
by zby
in thread Using s///e and it just doesn't feel right
by rkg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |