Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: File upload quit working

by Anonymous Monk
on Jan 19, 2012 at 12:23 UTC ( #948770=note: print w/ replies, xml ) Need Help??


in reply to File upload quit working

I fixed it. I guess, even though I am using CGI, I needed to define a new cgi:

my $q = new CGI; my $filename = $q->param("incoming"); my $handle = $q->upload("incoming");
That did it.

So I fixed it myself. Thank you for taking the time to offer a suggestion. There were no errors at all.

Richard


Comment on Re: File upload quit working
Download Code
Re^2: File upload quit working
by Anonymous Monk on Jan 19, 2012 at 12:42 UTC

    So I fixed it myself. Thank you for taking the time to offer a suggestion. There were no errors at all.

    CGI offers two interface, oo interface  CGI->new ... and functional interface  use CGI qw/ param upload /; ...

    If you're trying to use the functional interface, but you fail to import param/upload, your program would have died with

    $ perl -MCGI -e " param() " Undefined subroutine &main::param called at -e line 1.

    So yes, there was definitely a problem

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://948770]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2015-07-07 10:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls