in reply to Re^2: undefined value as filehandle from Curl.pm
in thread undefined value as filehandle from Curl.pm

So, here is an oddity. If I remove the following line:

$lwpcurl->{agent}->setopt( CURLOPT_HEADERDATA, ['Content-Type:text/xml +'] );

The error:

Can't use an undefined value as filehandle reference at /home/mware/httppost/lib/perl5/site_perl/5.8.8/LWP/Curl.pm line 236.

Goes away.

Although, the http post still does not work properly. I'm not seeing my test file on the server. I have a curl command line test that works correctly, but can not seem to configure the perl code to do the same.

Replies are listed 'Best First'.
Re^4: undefined value as filehandle from Curl.pm
by wanderedinn (Sexton) on Jun 30, 2016 at 20:12 UTC

    I have determined why this error was caused in this code. That is because the parameter I am attempting to use, expects a pointer to a file, file handle, rather than a string as I was attempting. Hence the reason for the filehandle error. Thought I'd post an update for others who might attempt to use this module.