Hello fellow monks, long time listener first time caller.
I am having a problem with Archive::Tar on a windows XP machine. I am using Activestate perl 5.8.8 and Archive::Tar 1.23. What i am trying to accomplish is extract one file from a each tarball that is in a directory.
This is what I have so far
#!/usr/bin/perl -w
use strict;
use Archive::Tar;
my $wdir = "U:\\EMM loads";
my $tarballs;
my $toc = "toc";
opendir(PWD, $wdir) or die "can't open $wdir: $!";
while (defined($tarballs = readdir(PWD))) {
if ($tarballs =~ /\.tar$/) {
my $tar = Archive::Tar->new("$wdir\\$tarballs");
$tar->extract_file($toc,$wdir);
}
}
closedir(PWD);
The Problem i am having is that when it tries to read the tarball it bombs with a checksum error. I have tried this with several tarballs and they all do the same thing. I can open these fine using winzip and on a solaris machine fine.
Has anyone run into this before? or am I missing something? Thanks for the help!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.