unzip the file in perl -
my script :
#!/usr/local/bin/perl
use posix qw(strftime); use strict; use warnings; use getopt::long; ($artifact, $package_id) = @argv; print $artifact; print $package_id; if($artifact =~ /\.zip$/i) { chdir("/apps/checkout/artifactory/xxkintana/$package_id"); unzip $artifact; }
run : ./script.pl test-1.0.zip 4370177
error :
can't locate object method "unzip" via package "test-1.0.zip" (perhaps forgot load "test-1.0.zip"?) @ ./script.pl line 16.
please me
-thanks
use module archive::zip
pull files zip archive.
the module contains examples directory
including 1 named extract.pl
Comments
Post a Comment