Welcome to the Monastery | |
PerlMonks |
Re: CGI, uploading multiple filesby huck (Prior) |
on Mar 13, 2017 at 21:55 UTC ( [id://1184484]=note: print w/replies, xml ) | Need Help?? |
Have you checked the error.log of your server to see if there are any error conditions raised while it ran? The only way i can see it not returning the print "<p><b>Name</b> -- $name<br><b>Email</b> -- $email<br><b>Comments</b> -- $comments<br>"; contents is if the cgi process terminated wit an error before reaching that point, like dieing because it cannot open the file. To catch what would otherwise be a terminal error you can wrap the code in an eval block like so the point made by pojabout use CGI::Carp 'fatalsToBrowser'; may serve to do the same thing. Or it may identify another error ps, what do you think should be in $upload_file? what parm has the same name as of one of the files to be uploaded, not the value, its name. consider see http://search.cpan.org/~leejo/CGI-4.35/lib/CGI.pod#Processing_a_file_upload_field you may also be interested in To determine if you need binmode and should use read, or if you dont want binmode and can use <$upload_file>
In Section
Seekers of Perl Wisdom
|
|