in reply to perl, cpio, and pipe

You don't check whether $archivedir exists and you can chdir into it. Use autodie or manually check for success:

chdir $archivedir or die "Couldn't chdir into '$archivedir': $!";

Replies are listed 'Best First'.
Re^2: perl, cpio, and pipe
by momo33 (Beadle) on Jan 13, 2011 at 14:27 UTC
    In the actual code I do check (I build the filelist between chdir and cpio). After modification to make it more similar to the example-code I can assure you that chdir($archivedir) is executed correctly.