Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^2: using Archive::Tar

by Tux (Abbot)
on Oct 04, 2011 at 14:45 UTC ( #929560=note: print w/replies, xml ) Need Help??

in reply to Re: using Archive::Tar
in thread using Archive::Tar

Combine with File::Find:

use strict; use warnings; use autodie; use Archive::Tar; use File::Find; my @fl; find (sub { -d $_ or push @fl, $File::Find::name }, "Bundle::Finaltest +"); Archive::Tar->create_archive ("Bundle-FinalTest.tar.gz", COMPRESS_GZIP +, @fl);

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^3: using Archive::Tar
by ansh batra (Friar) on Oct 05, 2011 at 05:26 UTC
    thanks H.Merijin i have used your code
Re^3: using Archive::Tar
by ansh batra (Friar) on Oct 05, 2011 at 07:21 UTC
    what shall i do when i want to compress a FILE to .gz only? please reply asap!!!

      For compressing a single file, why use perl? You could use gzip on the command line.

      If it needs to be in perl, look at Compress::Zlib. The manual has lots of info about gzip support.

      $dest = Compress::Zlib::memGzip ($buffer); $dest = Compress::Zlib::memGunzip ($buffer);

      Enjoy, Have FUN! H.Merijn

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://929560]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2018-03-20 01:05 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (247 votes). Check out past polls.