rasa has asked for the wisdom of the Perl Monks concerning the following question:
I expect "test.txt" to be deflated to "test" sub-folder. Likewise "test1.txt" to be deflated to "qa" sub-folder. However, the "path" information is empty, when I open the TGZ file. I tried passing an options array using $tar->add_data( "test/test.txt", "Hello World 1", {prefix => 'test'}); to no avail, either. I spent several hours on trying to see what may be amiss. I am unable to make progress. Please help.use strict; use Archive::Tar ; my $tar = Archive::Tar->new; my ($tarFile) = "test.tar"; $tar->add_data( "test/test.txt", "Hello World 1"); $tar->add_data( "qa/test1.txt", "Hello World 2"); $tar->write( "$tarFile.tgz", 8); $tar->clear; undef $tar;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cannot add "folder" information to Archive::Tar->add_data in Win32 (ActivePerl)
by graff (Chancellor) on Nov 05, 2009 at 07:23 UTC | |
by rasa (Initiate) on Nov 05, 2009 at 12:51 UTC | |
by graff (Chancellor) on Nov 05, 2009 at 14:44 UTC | |
|
Re: Cannot add "folder" information to Archive::Tar->add_data in Win32 (ActivePerl)
by rasa (Initiate) on Nov 05, 2009 at 13:02 UTC | |
by graff (Chancellor) on Nov 05, 2009 at 14:49 UTC | |
by rasa (Initiate) on Nov 05, 2009 at 15:09 UTC |