On 12/02/2006 06:22 AM, Sergio Escalada wrote:
Hi all! I would like to know if it's possible to make an array sorting with
a subroutine call.
Usually, a sort is made as, for example:
sort {$a <=> $b} @array;
But my intention is something like:
sort subroutine_call @array;
sub subroutine
{
$a <=> $b;
}
How could I do it?
Thanks.
Sergio.
You can do that. The Perl documentation on your system probably tells
you how.
If you have ActiveState Perl, do this:
Start->Run->"perldoc -f sort"
Under a un*x perl, just do this at a terminal:
perldoc -f sort
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>