http://www.perlmonks.org?node_id=247717

CodeJunkie has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
I have a slightly silly problem with archive::zip

I want to have a program that just unzips all files in an archive to the current directory. I managed to adapt a script from the docs for this purpose, and it works, but for some reason all the extracted files have a '.' character infront of them!!!! Weird! So my files look like this:

.myfile.cgi

#!c:\perl\bin\perl use strict; use CGI::Carp 'fatalsToBrowser'; use CGI qw( :standard :html3 ); use Archive::Zip; my $form=new CGI; my ($submit)=param('submit'); print "Content-type:text/html\n\n"; if ($submit) { print "Unzipping Archive...<br/>"; my $zip = Archive::Zip->new(); my $zipName = "webauction3.4.zip"; my $status = $zip->read( $zipName ); die "Read of $zipName failed\n" if $status != AZ_OK; $zip->extractTree(); } else { print "<form name=\"install\" method=\"post\" action=\"install.cgi\" +> <input type=\"submit\" name=\"submit\" value=\"Install >>\"/> </form>"; }

I'm not sure why this is happening, can someone help me? I could always rename all the files after extracting, but this is not the neatest way of doing it i'm sure.

cheers,
Tom