in reply to Re^2: manipulating cpio archive
in thread manipulating cpio archive

I would now look inside the Archive::Cpio object (using Data::Dumper) to see what it contains, before and after your modification.

Replies are listed 'Best First'.
Re^4: manipulating cpio archive
by momo33 (Beadle) on Jan 17, 2011 at 19:20 UTC
    It looks the same to me. The entry I want to skip is there.

      Well, Perl doesn't think so. Maybe it has whitespace at the end of the archive name? Maybe post the actual output of Data::Dumper?

      Interestingly enough, Archive::Cpio contains no call to binmode. I'm not sure whether it will work on Windows at all.

        OK, you asked for it (no sarcasm intended):
        $VAR1 = bless( { 'list' => [ bless( { 'mode' => 16877, 'nlink' => 2, 'ino' => 63796, 'rdev' => 0, 'dev' => 2056, 'uid' => 1000, 'mtime' => 1295288664, 'name' => '.', 'data' => undef, 'gid' => 1000 }, 'Archive::Cpio::File' ), bless( { 'mode' => 33188, 'nlink' => 1, 'ino' => 63800, 'rdev' => 0, 'dev' => 2056, 'uid' => 1000, 'mtime' => 1295288664, 'name' => 't2', 'data' => undef, 'gid' => 1000 }, 'Archive::Cpio::File' ), bless( { 'mode' => 33188, 'nlink' => 1, 'ino' => 63799, 'rdev' => 0, 'dev' => 2056, 'uid' => 1000, 'mtime' => 1295288664, 'name' => 't1', 'data' => undef, 'gid' => 1000 }, 'Archive::Cpio::File' ), bless( { 'mode' => 33188, 'nlink' => 1, 'ino' => 63801, 'rdev' => 0, 'dev' => 2056, 'uid' => 1000, 'mtime' => 1295288664, 'name' => 't3', 'data' => undef, 'gid' => 1000 }, 'Archive::Cpio::File' ) ], 'archive_format' => bless( { 'magic' => 29127 }, 'Archive::Cpio::OldBina +ry' ) }, 'Archive::Cpio' );