Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: question about: my $a AND sort {$a <=> $b} keys %hash

by Discipulus (Canon)
on Aug 06, 2015 at 09:13 UTC ( [id://1137632]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    Can't use "my $a" in sort comparison at pmonks06082015.pl line 4.
    
  2. or download this
    $a
    $b
    Special package variables when using sort(), see sort. Because of this
    + specialness $a and $b don't need to be declared (using use vars , or
    + our()) even when using the strict 'vars' pragma. Don't lexicalize th
    +em with my $a or my $b if you want to be able to use them in the sort
    +() comparison block or function.
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-25 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found