in reply to use strict Question?

As SirClive already mentioned, $a and $b are globals (so that sort can work easily), and thus not subject to strict vars.

This works in practice, but leaves the bitter taste of design smell in your mouth.

In Perl 6 there is instead a very simple way to declare formal parameters to a block, you can write

@array.sort: { 2 * $^a <=> $^b }

Here the twigil ^ declares the variables as formal parameters to the block. So by writing two extra characters in the typical sort block you get rid of this smelly exception.

Since these parameters are filled in lexicographic order of their names, @array.sort: { $^b <=> $^a } sorts in reverse, just as it would do (with slightly different syntax) in Perl 5.

Perl 6 - links to (nearly) everything that is Perl 6.