Hello,

I wrote this script which worked great on my local Windows box. It lists the 
contents of the Zip file. But when I publish it on my Unix box I dont even get 
an error. It just does not work.

#!/usr/bin/perl -W

use CGI ':standard';

use CGI::Carp qw (fatalsToBrowser);



$o_files = new CGI;

$f_zip = $o_files->upload('f_zip');

    

use Archive::Zip qw( :ERROR_CODES :CONSTANTS );

use IO::File();

$o_file = IO::File->new($f_zip, 'r' );    

$o_zip = Archive::Zip->new();

$status=$o_zip->readFromFileHandle($o_file);    

@arr_files= $o_zip->memberNames();    

foreach (@arr_files) {    

    print $_.'<br>';

}

Does anyone see anything that I might be missing? 

Strange things like this has happened to me with other scripts. Just as an 
example, it happened to me with PerlMagick. The same script that worked on 
Windows didnt work on Linux and it was all because of something like this:

In Windows the script had this line and worked: $o_img->Read($path_to_file);

And it didnt work on Unix. Then I changed the line to: 
$o_img->Read(file=>$path_to_file); and that did the trick (adding "file=>")

That is just an example, this script does not have anything to do with 
PerlMargick but maybe someone sees anything that I can be missing here as it 
happened to me with Perl Magick.

Thanks in advance



----------------------------------------------
Correo Web: http://correo.enredes.net
_______________________________________________
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to