Great Monks!
I am trying to unzip some .txt files using IO::Uncompress::Unzip in the code snippet below. Am getting this error though, which i suspect is to do with unseen folders in windows;
.
Use of uninitialized value $_1 in string eq at C:/Strawberry/perl/lib/IO/Compress/Base/Common.pm line 280.
unzip failed: input file '.' is a directory
Below is the code
opendir(ZIPPED, $zipdir)or die "couldn't open $zipdir: $!\n"; my @zd = readdir(ZIPPED); my @uzd; foreach(@zd) { my $inf = $_; my $outf = $uzd[@uzd]; # print $_,"\n"; unzip $inf => $outf or die "unzip failed: $UnzipError\n"; }
Below is sample of the output i get if i run the print line and comment out the unzip line;
.
..
730372_Atoll.zip
730376V01_Atoll.zip
730378V01_Atoll.zip
730691_Atoll.zip
732689_Atoll.zip
732690_Atoll.zip
732691_Atoll.zip
How can i get past the "." and ".." and get unzip to uncompress the files. Thanks!
In reply to unzip fail using IO::Uncompress::Unzip by keienn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |