Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

(ichimunki) re: Sort and related stuff

by ichimunki (Priest)
on Feb 23, 2001 at 17:38 UTC ( [id://60477]=note: print w/replies, xml ) Need Help??


in reply to Sort and related stuff

Lots of good answers here already. Short form, $a and $b are only used once in the first example, which is why you're being warned. In the second example, sort is using them as well. No warning.

For the record, I would strongly recommend not building a subroutine that relies on external data that may or may not exist correctly. In this case, if I do two sorts and then do a call to this sub with variables set by the first sort, your subroutine will use the $a and $b vars from the second sort rather than the arguments I sent the function.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://60477]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-26 04:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found