--Davemy @list = qw(nfs-4 afp-2 cifs-8 nfs-2 cifs-1 afp-7 cifs-11); print sort fooSort @list; sub fooSort { my @a = split '-', $a; my @b = split '-', $b; $a[0] cmp $b[0] || $a[1] <=> $b[1] }
update: I like Abigail-II's Schwartzian Guttman-Rosler Transform! ++!
In reply to Re: sorting question
by redsquirrel
in thread sorting question
by hotshot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |