http://www.perlmonks.org?node_id=954625


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;