@combined = sort {$a->[0] <=> $b->[0]} (@listone,@listtwo); for ($i=0; $i