in reply to how to prevent open from dying

Replace die with warn:

open INFILE, '<', $inputFile or warn("analysis file not found"), next;

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: how to prevent open from dying
by coontie (Sexton) on Jun 30, 2006 at 15:55 UTC
    I guess the only problem with this snipped is that it prints nothing to stdout. It just blows right through missing files and keeps going.

      It prints to STDERR, just like die does.

      After Compline,
      Zaxo

        He meant the code then proceeds to use an unopened handle if you have warn without next. Of course, that doesn't matter *if* the remaining code consists of while (<INFILE>) { ... }.