#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Posts
    0
    Rep Power
    0
    I know how to zip files from the command line, but how can I call the zip command with perl to create a custom zip file on the fly?
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Posts
    0
    Rep Power
    0
    Either us Archive::Zip or something like this:
    my @args =
    ('/usr/bin/zip',ArgumentsToZip,DestFile,FilesToZip);
    my $result = system(@args);

    Then check $result to see if it succeeded.
    I usually use -j as an argument to strip off the path for the zipped files.

    Hope this helps.


    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by bshold:
    I know how to zip files from the command line, but how can I call the zip command with perl to create a custom zip file on the fly?[/quote]


IMN logo majestic logo threadwatch logo seochat tools logo