> "+Brian" == +Brian d foy <[EMAIL PROTECTED]> writes:
+Brian> my @sorted = map { $_->[0] }
+Brian> sort { $a->[1] cmp $b->[1] }
+Brian> map { [ $_, substr($_, 2, 3) ] }
+Brian> @lines;
Except that the substr() function is likely not expensive enough
In article <005e01c1370a$1a1fd920$f95314ac@04778-9>,
[EMAIL PROTECTED] (McGregory Pinto) wrote:
> How i do a sort, like "sort -k3,5 -d" "" command, in a file using Perl.
you can use a Schwartzian Transform with the sort key being
the part of the string that you extract with substr:
my @sorted
Hi ...
How i do a sort, like "sort -k3,5 -d" "" command, in a file using Perl.
Sorry my bad english.
Gregory.