"my $a" used in sort comparison at ./1.pl line 7.
That's why you should never use $a and $b as variable names. sort needs access to the package variable $a (documented at $a).
Update: link to perlvar added.
In reply to Re: question about: my $a AND sort {$a <=> $b} keys %hash
by choroba
in thread question about: my $a AND sort {$a <=> $b} keys %hash
by rsFalse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |