local *_sort = sub { return sort { $a <=> $b } @_ }; my $a = 'whatever'; print join(' ', &_sort(@arr2)), "\n";