When opening a file, it's seldom a good idea to continue if the request failed, so open is frequently used with die. Even if die won't do what you want (say, in a CGI script, where you want to format a suitable error message (but there are modules that can help with that problem)) always check the return value from opening a file.Changing line 234 to
should be informative.open( my $fileb, ">", \$content ) or die "$!";
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re: undefined value as filehandle from Curl.pm
by kennethk
in thread undefined value as filehandle from Curl.pm
by wanderedinn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |