Greetings;
I have a file that I need to sort and currently I am just
sorting it by
@datalist = sort(@datalist);
but it will eventually have many more records and many of
them may be quite large, but I only need to sort on the
first six characters which would be faster. Wouldn't it?
I have looked at perldoc and it shows things like
@articles = sort {$a <=> $b} @files;
but I can't figure out how to tell the sort that $a and $b
are the first six characters of @datalist. That is numeric
data BTW.
Any help or pointers appreciated.
Dennis
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>