Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: CGI.pm and filehandle woes

by sgifford (Prior)
on Mar 27, 2007 at 19:16 UTC ( [id://606843]=note: print w/replies, xml ) Need Help??


in reply to CGI.pm and filehandle woes

In general, if a filehandle isn't seekable, it's not enough to add classes to its @ISA list. You have to find a way to avoid seeking, or else write to a temporary file and then re-open that (using, for example, File::Temp).

Non-seekable filehandles often come from pipes or network reads. In these cases, it's simply not possible to seek forwards and backwards in the file: once the data is read, it is gone.

I'm not sure of the details of how CGI handles uploaded files, but hopefully that will get you pointed in the right direction.

Log In?
Username:
Password:

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

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

    No recent polls found