in reply to Re: Sorting Alphanumeric Arrays
in thread Sorting Alphanumeric Arrays
use Sort::Key::Maker sort_int_str => sub { int $_, $_ }, qw(int str); my @sorted = sort_int_str @old;
updated: using a regular expresion like /(\d+)(.*)/ to extract the keys was slow!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Sorting Alphanumeric Arrays
by BrowserUk (Patriarch) on Jun 13, 2005 at 22:01 UTC | |
by salva (Canon) on Jun 13, 2005 at 22:41 UTC | |
by BrowserUk (Patriarch) on Jun 14, 2005 at 00:11 UTC | |
by salva (Canon) on Jun 14, 2005 at 06:51 UTC |