#!/usr/bin/perl -lw use strict; my ($a, $b) = (7, 5); ($b, $a) = ($a, $b); print join ' ', sort { $a <=> $b } qw( 5 28 1 ); print "$b $a"; #### 5 1 28 7 5 #### "my $a" used in sort comparison at prog.pl line 8. "my $b" used in sort comparison at prog.pl line 8.