question about sort()
From: Wiseguy (noone_at_uber.usachoice.net)
Date: 03/04/05
- Previous message: CowBoyCraig: "Trouble with $key to HASH when Numeric"
- Next in thread: Jim Gibson: "Re: question about sort()"
- Reply: Jim Gibson: "Re: question about sort()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 3 Mar 2005 22:29:26 -0600
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?
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
- Previous message: CowBoyCraig: "Trouble with $key to HASH when Numeric"
- Next in thread: Jim Gibson: "Re: question about sort()"
- Reply: Jim Gibson: "Re: question about sort()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|