http://www.perlmonks.org?node_id=932379


in reply to Re: split line from one point
in thread split line from one point

thanks, i have this: read line <> on closed file handle IN at split.pl line 4.

Replies are listed 'Best First'.
Re^3: split line from one point
by moritz (Cardinal) on Oct 19, 2011 at 12:36 UTC
    That means that the first open() call failed. Either use autodie; in the beginning, or write your calls as
    open my $IN, '<', 'transaction' or die "Cannot open 'transaction' for +reading: $!"; ... while (<$IN>) { ... }

    (And adapt the code for the second file accordingly).