develooper Front page | perl.beginners | Postings from January 2004

RE: Zip using Perl

Thread Previous | Thread Next
From:
Dan Muey
Date:
January 29, 2004 08:49
Subject:
RE: Zip using Perl
Message ID:
D6D77DB239A2004BB08A240E2E71460D27EF82@LSLOFFICE.infiniplex.infiniplex.com
> On Wed, 28 Jan 2004 15:37:12 -0500
> "RL" <lrlemieux@hotmail.com> wrote:
> 
> > I would like to "zip" a file using perl script. I used following 
> > command:-
> > 
> > system ("zip <zip name> <file name>");
> > 
> > However this command fails when the filename is more than 8 
> > characters.

Why not try Archive::Zip instead of shelling out.
It works well for me and no worrying about paths and command 
format, etc etc via the shell.

My main use is for unzipping a file and parsing it and creating 
sql inserts from it and then doing the sql.

If I remember right the error code thign took me  abit of getting 
used to but it's pretty straight forward once you look into it. 
There's lots of example also which is really nice.

HTH

Dmuey

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About