in reply to Sorting question

@new= sort { my ($a1,$a2)= split /\s+/,$a; my ($b1,$b2)= split /\s+/,$b; return($a1<=>$b1 or $a2 cmp $b2); } @old;
should do it (untested). To understand this just do 'perldoc -f sort' to read about the sort function.

UPDATE: Added the much needed 'sort' key word after getting hints from almut, johngg and shmem