Thanks Jason for your reply.
I tried using an absolute path for gzip, but I'm getting the same error.
I don't understand why I can run gzip from the shell but can't run it
through perl. I'm able to run tar and other programs using the system
function but not gzip.
I'm thinking that I should try a different approach - maybe using a
pipe or something. It seems like there should be a way to run gzip.
I also looked into the Archive Zip module, but the site is running on
a shared server and installing the module, the modules it depends on,
and the zlib library isn't really an option.
lance
At 11:03 AM +1000 5/1/01, King, Jason wrote:
>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/