in reply to How do I Gzip a file in perl script

Just wanted to make absolutely sure that the submitt0r of this question is aware of the wonderful world of backticks.
`gzip -9 $filename`;
will do this for you. -malloc

Replies are listed 'Best First'.
Re: Re: How do I Gzip a file in perl script
by Hero Zzyzzx (Curate) on May 30, 2001 at 02:08 UTC

    Nanny comment:
    Just make sure to untaint your data, of course, if you're going to pass user supplied data to the shell. Otherwise you'll be giving hax0rz an in to your server . . .

    Practice safer coding:

    #!/usr/bin/perl -wT use strict;

    See CGI Security and the null byte problem for more info.