in reply to Trying to read print in a loop inside a subroutine

open(REPLAY_FILE, "+<$rpl")
Not the solution, but open files this way:
open my $REPLAY_FILE, '+<', $rpl or die $!; while (my $line = <$REPLAY_FILE>) { #... do stuff with $line } close $REPLAY_FILE;
See open for more information.

Replies are listed 'Best First'.
Re^2: Trying to read print in a loop inside a subroutine
by Anonymous Monk on May 22, 2020 at 04:58 UTC
    Sure -thanks for the tip.