in reply to undefined value as filehandle from Curl.pm
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: undefined value as filehandle from Curl.pm
by stevieb (Canon) on Jun 28, 2016 at 14:52 UTC | |
by Anonymous Monk on Jun 28, 2016 at 17:36 UTC | |
by Marshall (Canon) on Jun 30, 2016 at 16:34 UTC | |
|
Re^2: undefined value as filehandle from Curl.pm
by wanderedinn (Sexton) on Jun 28, 2016 at 14:58 UTC | |
by wanderedinn (Sexton) on Jun 29, 2016 at 14:20 UTC | |
by wanderedinn (Sexton) on Jun 30, 2016 at 20:12 UTC |