- or download this
@list=map {substr($_,1)}
sort
...
#or
@list=map {substr($_,1)} sort
map {pack("CA*",length($_),$_)} @words;
- or download this
sorted = my_list.map {|i| [ i.split(/\|/)[2,4],i ]}.
sort.
map { |i| i[-1] }
- or download this
@list=map(substr($_,1),sort(map(pack("CA*",length($_),$_),@words)));
- or download this
my @tmp = map { pack("CA*",length($_),$_) } @words;
my @tmp2= sort @tmp;
my @list= map { substr($_,1)} @tmp2;