in reply to Sorting an array of strings by number

force comparing when you sort :

foreach $line (sort { (split /:/, $a)[0] <=> (split /:/, $b)[0] } @lis +t){ ...

He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

Chady | http://chady.net/