You are viewing the version of this documentation from Perl blead. This is the main development branch of Perl. (git commit 1f22b8d1e5f463834cb03995e1065d0b083e11c0)
$a
$b

Special package variables when using sort(), see "sort" in perlfunc. 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 them with my $a or my $b if you want to be able to use them in the sort() comparison block or function.