in reply to readline() on close filehandle $handle
You don't tell us the full error message. Perl tells you the line number where the error or warning occurs, and that line number helps us to find the line where the error occurs.
The warning most likely is issued because you are not checking whether opening the file works:
open my $handle, "<", "./Data2" or die "Couldn't open ./Data2";
Most likely, you mean ./tmp/Data2 and not ./Data2, but Perl will tell you.
|
|---|