Erm, why not just use an ST and do the matching once and not worry about clobbering $1 et al. More efficient to boot.
my @result = map { $_->[0] } sort { $a->[1] <=> $b->[1] } map { /_(\d{2})_/; [ $_, $1 ] } @f;
In reply to Re: Regular expressions and sort
by Fletch
in thread Regular expressions and sort
by zaro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |