two things you should do... #!/usr/bin/perl -W is only invoked on linux check perldoc perlrun for passing arguments to both linux and win32 scripts.
use diagnostics; may help you. use File::Spec::Functions; can be a nice way of building os-independent file paths. my $path = catfile($vol, @dirs, $file); #something like this, where $vol is for win32 Since it's on the web, try running from the command line first, and see if there's any errors. Also, you may want to check your web servers error.log file. Fatals will go to the browser, but not warnings. On 6/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
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
-- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html _______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs