W
Wiseguy
OK. I need to sort a list and I have the following code
@L=(35,10,0,27,100,-4);
sub numeric { $A <=> $b; }
@L=sort numeric @L;
The only reference I have is an ancient Oreilly book on Perl 4.
does sort() actually sort the operand list or only return a sorted list?
Is it safe to use the source operand as the return value of sort() as well?
@L=(35,10,0,27,100,-4);
sub numeric { $A <=> $b; }
@L=sort numeric @L;
The only reference I have is an ancient Oreilly book on Perl 4.
does sort() actually sort the operand list or only return a sorted list?
Is it safe to use the source operand as the return value of sort() as well?