I believe this calls for an application of the GRT (untested):
my @newArr = map { # put it all back together join '', @$_ } sort { # dereference and sort numerically by 2nd element $a->[1] <=> $b->[1] } map { # break off the digits and put in an anonymous array [ split /(\d+)/ ] } @arr;
@_=qw; Just another Perl hacker,; ;$_=q=print "@_"= and eval;
In reply to Re: Need help in sorting the array
by bv
in thread Need help in sorting the array
by perlCrazy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |