in reply to Re: unzip fail using IO::Uncompress::Unzip
in thread unzip fail using IO::Uncompress::Unzip
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: unzip fail using IO::Uncompress::Unzip
by Marshall (Canon) on Sep 29, 2016 at 19:37 UTC | |
|
Re^3: unzip fail using IO::Uncompress::Unzip
by Anonymous Monk on Sep 27, 2016 at 09:35 UTC |