try like this
#!/usr/bin/perl -w my (@home); @home = (21,29,2,23,10,9); print map{$_. "\n"} sort { $a <=> $b} @home;
In reply to Re: Declaring my variables in sort function?
by perladdict
in thread Declaring my variables in sort function?
by kettle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |