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

So open(my $fh, "<", "test.xml"); in your post Re^2: undefined value as filehandle from Curl.pm is from LWP::Curl as well? I don't think that it is.

Change it to open my $fh, "<", "test.xml" or die $!;

Replies are listed 'Best First'.
Re^6: undefined value as filehandle from Curl.pm
by wanderedinn (Sexton) on Jun 28, 2016 at 16:29 UTC

    Yes, that is in my code. But, the error generated when running the script was not referencing my code:

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

    my example code I posted should have had:

    open(my $fh, "<", "test.xml") or die "could not open input file ($!)\n";

    I had posted an older version of the code