use strict; my @home = (1, 2, 23, 10, 9); print map { "$_\n" } sort { $a <=> $b } @home;