For some reason, I thought the leading zero would address that. What was I thinking? Moving on...
map { ( my $s = $_ ) =~ s/(\d+)/ sprintf('%010d%s', length($1), $1) /eg; [ $_, $s ] } }
One could use pack instead of sprintf, but it won't work with unicode semantics. That's already a problem, but it'll be even worse in 5.12 because I believe unicode semantics will be used for all strings instead of just those internally encoded as UTF-8 (by default).
In reply to Re^4: Sort problems
by ikegami
in thread Sort problems
by erez_ez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |