lance turner writes ..


>I'm trying to use the system function to run the gzip program with 
>the following line of code:
>
>       $status = system("gzip $filename");
>
>       where $filename is the file that is to be compressed
>
>It isn't working and a status of 65280 is being returned.

return codes from system are left shifted by 8 (so that other codes can be
included in the mask) .. so to get the real return code you have to shift
right

  perldoc -f system

65280 >> 8 is 255 .. depending on your system - this return code could mean
anything

my guess is that it means that the system couldn't find the 'gzip' program
.. try putting an explicit path to gzip in your program .. get the explicit
path in what I guess is a *nix system with

  which gzip

on the command line

alternatively there's an Archive::Zip module on CPAN that will allow you to
do the zipping in Perl

  http://search.cpan.org/search?dist=Archive-Zip

-- 
  jason king

  A Canadian law states that citizens may not publicly remove bandages.
  - http://dumblaws.com/

Reply via email to