while (@tst1) { $i= shift @tst1; $j= shift @tst2; chomp($i); chomp($j); `diff $i $j > /dev/null`; `echo $?`; }