Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Rename files in gzip tarball: No such file in archive: '/path/to/file1.txt'

by karlgoethebier (Abbot)
on Dec 09, 2017 at 19:27 UTC ( #1205231=note: print w/replies, xml ) Need Help??


in reply to Rename files in gzip tarball: No such file in archive: '/path/to/file1.txt'

Just an idea:

#!/usr/bin/env perl use strict; use warnings; use Archive::Tar; use feature qw(say); use Path::Tiny; my @files = qw (foo.txt bar.txt); my @copies = map { path($_)->copy( path($_)->digest . "_$_" ) } @files +; my $archive = q(kgb.tgz); Archive::Tar->create_archive( $archive, COMPRESS_GZIP, @copies ); say for Archive::Tar->list_archive($archive); unlink for @copies; say q(--); say qx (tar tf $archive); __END__

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1205231]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2021-04-16 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?