in reply to Re: Re: Re: Re: Re: Sort problem
in thread Sort problem
If that is the problem (hard to tell from the post) then all you need is $" = '';
@in = ( ['the cat sat'], ['the ', 'cat', 'sat'], ['the cat', 'sat'], ['the', 'cat', 'sat'], ); { local $" = ''; @out = sort { "@$b" cmp "@$a" } @in; } use Data::Dumper; # munge the output for compactness and to make it look nicer $Data::Dumper::Indent = 0; print map {s/\[/\n \[/g; $_} Dumper \@out; __DATA__ $VAR1 = [ ['the','cat','sat'], ['the ','cat','sat'], ['the cat','sat'], ['the cat sat']];
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|