Monks,
I'm trying to figure out what exactly is the problem with my code. am trying to open a file, print and close it using the module FileHandle. But I'm encountering the following error
Can't call method "close" on an undefined value at ...... line ......
Here is the code snippet
use strict; use FileHandle; my $LOG = "/tmp/log.txt"; my $fh = FileHandle->new(">> $LOG"); print $fh "this is a test"; $fh->close;
In reply to error using FileHandle Module by doubledecker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |