foreach $item(@sorted){ @new=split(/ /,$item); print $new[13]; if($new[13] > $new [10]){ print $item; }