Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: CGI and Storable : explain me this, please.

by davidrw (Prior)
on Apr 27, 2006 at 02:17 UTC ( [id://545933]=note: print w/replies, xml ) Need Help??


in reply to Re: CGI and Storable : explain me this, please.
in thread CGI and Storable : explain me this, please.

The question here, though, is why CGI's param method is returning a typeglob. Possibly the method performs differently in a string context?
...
CGI is probably giving you a filehandle...
That is it -- See (directed at OP) the 'CREATING A FILE UPLOAD FIELD' section in the CGI docs .. When the form is processed, you can retrieve the entered filename by calling param():
$filename = param('uploaded_file');
The filename returned is also a file handle.

So the split //, $var works because it's scalar context so is the filename.. Otherwise it must be treating it as a handle, and hence the observed error..

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-25 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found