in reply to Re^3: Sort problems
in thread Sort problems
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).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Sort problems
by erez_ez (Acolyte) on Dec 23, 2008 at 13:39 UTC | |
by ikegami (Patriarch) on Dec 23, 2008 at 18:03 UTC | |
by erez_ez (Acolyte) on Dec 24, 2008 at 08:55 UTC | |
by ikegami (Patriarch) on Dec 24, 2008 at 09:02 UTC | |
by erez_ez (Acolyte) on Dec 24, 2008 at 10:48 UTC | |
|