$ perl -le 'my $a=1; print sort {$b<=>$a} 1' Can't use "my $a" in sort comparison at -e line 1.