in reply to Looping in a Loop

Another habit you should get into is to check for success when you open a file and print the o/s error held in $! on failure.

$ perl -Mstrict -Mwarnings -E ' > open my $inFH, q{<}, q{doesNotExist} > or die qq{open: < doesNotExist: $!\n};' open: < doesNotExist: No such file or directory $

Welcome to the Monastery and the world of Perl!

Cheers,

JohnGG