http://qs1969.pair.com?node_id=128383


in reply to Re: Uploading files using cgi.pm
in thread Uploading files using cgi.pm

I read through CGI.pm and see what you are referring to. The doc says that $fh will return a usable filehandle or undef if the param is not a valid filehandle.

I changed my existing code to reflect your suggestion, however I kept my loop in place that stick forms values into a hash. So, I ended up with something like:

my $fh = $query->upload($formdata{upload});

This ended up coming back as undef, however once I removed my hash and made a direct query:

my $fh = $query->upload('upload');

it worked. Thanks for your help.

-c