22 1 3 4 2 44 #### 1 3 22 2 4 44 #### open(IN, "sort.out"); @array=; close (IN); @sortedarray=sort {$a <=> $b} (@array); foreach $line (@sortedarray){ print OUT $line; } close(IN); close(OUT);