in reply to Perl crossing arms silently: loop stoping without any error message

make sure you got

#!/usr/bin/perl -w

pay attention to STDERR
read the error-log
maybe put some print STDERR "$your $junk $and $vars "; every hey and there, that might help you find the problem.

how big *is* this file? how many lines?
have you maybe found a line which is missing newlines somehow ?