Thanks great monks! I have tried Marshalls construct and successfully removed the "." and ".." directories. the code now looks as below
opendir(ZIPPED, $zipdir)or die "couldn't open $zipdir: $!\n"; my @zd = grep {!-d "$zipdir/$_"}readdir(ZIPPED); opendir(UNZIPPED, $unzipdir)or die "couldn't open $unzipdir: $!\n"; my @uzd = readdir(UNZIPPED); foreach(@zd) { next unless defined $_; my $inf = \@zd; my $outf = \@uzd; #print $_,"\n"; unzip $inf => $outf or die "unzip failed: $UnzipError \n"; }
I am still unable to unzip, the error I get is as below
Uncaught exception from user code:
unzip failed: input file '730372_Atoll.zip' does not exist
That is the first file in the folder.
And Marshall, the 'my @uzd; my $outf = $uzd@uzd' was intended to be an assignment of the unzipped
files to an array,
but i revised as shown in the code above.
So monks, what should i improve on? Thanks in advance!
In reply to Re^2: unzip fail using IO::Uncompress::Unzip
by keienn
in thread unzip fail using IO::Uncompress::Unzip
by keienn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |