in reply to readline() on closed file-handle is coming when reading the file

Please add:

or die "Cannot open file";

after the open.

  • Comment on Re: readline() on closed file-handle is coming when reading the file
  • Download Code

Replies are listed 'Best First'.
Re^2: readline() on closed file-handle is coming when reading the file
by johngg (Canon) on Aug 31, 2012 at 08:50 UTC

    Or, even better:

    or die "Cannot open file: $!";

    so that you can see the o/s error generated when the filehandle failed to open.

    Cheers,

    JohnGG