$ perl -le' my @x = qw[ one two three four ]; sub compare { $a cmp $b } print for sort compare @x; ' four one three two $ perl -le' my @x = qw[ one two three four ]; sub compare { $a cmp $b } print for sort compare() @x; ' Array found where operator expected at -e line 9, at end of line (Missing operator before ?) syntax error at -e line 9, near ") @x" Execution of -e aborted due to compilation errors.