use Data::Dumper; sub foo { return (); } warn Dumper(sort {$a <=> $b} foo('1000'));