in reply to Re^11: Sort problems
in thread Sort problems

No, I'm the one who wasn't paying enough attention or testing his stuff X_X. I wasn't calculating the right length.

print("$_\n") for map { $_->[0] } sort { $a->[1] cmp $b->[1] } map { my $s = $_; $s =~ s/(?<![\[\d])(\d+)/ sprintf('%010u%s', length($1), $1) /eg; $s =~ s/(?<=\[)(\d+)/ sprintf('%010u', 4294967296-$1) /eg; [ $_, $s ] } do { local $/; split ' ', <DATA> };

I tested it this time!

Replies are listed 'Best First'.
Re^13: Sort problems
by erez_ez (Acolyte) on Dec 25, 2008 at 13:03 UTC
    Hi ikegami, It works! Thanks a lot for the effort..