[kw-pm] Question regarding uploading file(s)

Robert Pike roberthpike at yahoo.com
Wed Jan 9 06:46:24 PST 2008


Hi all,
   Hopefully a quick question: has anyone written or
familar with writing CGI script(s) (in Perl) to accept
uploaded files? I've been trying to use the CGI module
but it looks as though on the <CGI
Handle>->import("filename") line is seems to stop at
that point and not process any further. Any ehlp would
be much appreciated. Here's a tim... I mean tidbit
with a rough outline of what I'm trying.

Rob 

our $query = new CGI;
...
...
$imgKey = "uplImg1";
$uploadFile = $query->upload($imgKey);
#*** prints here do not get reached ***
open UPLOADFILE, ">$defaultdir/uploads/$imgKey" or die
"Can't open the destination file"; 
binmode UPLOADFILE; 
while ( <$uploadFile> ) { 
    print UPLOADFILE; 
} 
close UPLOADFILE;


      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping


More information about the kw-pm mailing list