my $a = 10; my $b = 5; my @c = (1, 3, 19); @c = sort { $a <=> $b } @c; Can't use "my $a" in sort comparison at - line 4.