Mar 24, 2013, 2:58 AM
Post #5 of 6
Just a couple of things.
Re: [Zhris] Opening an empty file hangs it up
[In reply to]
1. The File::Open module does not export any fclose function.
2. In theory at least, this module's fopen syntax requires the opening mode to be a second argument, separated from the file name:
my $fh = fopen $file;
my $fh = fopen $file, $mode;
my $fh = fopen $file, $mode, $layers;
I haven't tried it, but I would expect your "my $fh = fopen ">>file.txt" syntax to mess things up.
Try something like: my $fh = fopen "file.txt", ">>" or die "...";