use strict; my @x = qw( 1xxx 2xxx 300x 10xx ); @x = sort @x; print "default sort: @x\n"; @x = sort {$a <=> $b} @x; print "numeric sort: @x\n";