> 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? >
perldoc -f sort. Look at the very first example. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists of only two components: ones and zeros, in roughly equal proportions. All that is required is to sort them into the correct order. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>