in reply to Re^2: Reading CGI.pm file upload spools with Archive::Zip
in thread Reading CGI.pm file upload spools with Archive::Zip

I really do not have a explination, and if someone has one I would like to know. You have to make a reference of the dereferenced file handler object. In your case you read line should look like this.

my $status = $zip->readFromFilehandle(\$$upload_filehandle);

Here a segement of code that I used to get this working...

my $fh = $c->upload('zip');
my $zip = Archive::Zip->new();
$zip->read(\$$fh);

my @members = $zip->members();

foreach my $member (@members){
my $filename = $member->fileName();
print "$filename\n";
}
  • Comment on Re^3: Reading CGI.pm file upload spools with Archive::Zip