Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: Getting a filehandle for uploaded file

by luker (Initiate)
on Oct 20, 2009 at 13:48 UTC ( [id://802232]=note: print w/replies, xml ) Need Help??


in reply to Re: Getting a filehandle for uploaded file
in thread Getting a filehandle for uploaded file

Thanks for the swift reply. I'm not sure I agree with your comment about CGI::upload though. According to man CGI:
CREATING A FILE UPLOAD FIELD ... print filefield(-name=>'uploaded_file', ... When the form is processed, you can retrieve the entered filename by c +alling param(): $filename = param('uploaded_file');
i.e. param is called with the name of the field.

Then it says:

The filename returned is also a file handle... # Copy a binary file to somewhere safe open (OUTFILE,">>/usr/local/web/users/feedback"); while ($bytesread=read($filename,$buffer,1024)) { print OUTFILE $buffer; }
I have also tried the no strict trick mentioned there, but it didn't help. Have also checked it's not browser-dependent.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (1)
As of 2024-04-24 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found