<>; @a=glob<>; @b=glob<>; while(@a){ $a=shift@a; $b=shift@b; ++$i; if($a ne $b){ print$i,$/,$a,$/,$b; } }