in reply to Declaring my variables in sort function?

Hi

try like this

#!/usr/bin/perl -w my (@home); @home = (21,29,2,23,10,9); print map{$_. "\n"} sort { $a <=> $b} @home;