Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^2: Doubt in Eval

by chrestomanci (Priest)
on Feb 17, 2012 at 21:26 UTC ( #954625=note: print w/ replies, xml ) Need Help??

in reply to Re: Doubt in Eval
in thread Doubt in Eval

As a footnote, the reason that $a is exempt from strict checking, is because it is one of the magic variables that you can use to specify a custom comparison to sort

For example, suppose you have a list of hashes, and you want to sort by the value of a key, you might write:,

my @persons_by_age = sort { $a->{'age'} <=> $b->{'age'} } @people;

Comment on Re^2: Doubt in Eval
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2015-12-01 05:28 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (794 votes), past polls