J
Jonas Andersson
Hi,
I sometimes get weird problems with file closures in Perl:
print FILE "...a lot of data...";
$line_number=240;
close(FILE) or &error_catcher;
....
exit;
sub error_catcher {
print "Error around line $line_number. Exiting. \n";
exit;
}
Any idea why this happens? I thought Perl waited for the writing to
the file to finish before it tried to close it? What could I do in
this situation?
Thanks for your time,
JA
I sometimes get weird problems with file closures in Perl:
print FILE "...a lot of data...";
$line_number=240;
close(FILE) or &error_catcher;
....
exit;
sub error_catcher {
print "Error around line $line_number. Exiting. \n";
exit;
}
Any idea why this happens? I thought Perl waited for the writing to
the file to finish before it tried to close it? What could I do in
this situation?
Thanks for your time,
JA