in reply to Re: Creating a tarball
in thread Creating a tarball

I'd guard that against unreadable files:

sub { -f || -d and push @filenamelist, "$_" }, => sub { -f || -d and -r and push @filenamelist, "$_" },

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^3: Creating a tarball
by tybalt89 (Monsignor) on Feb 07, 2019 at 07:41 UTC

    Which leads to the question: Should these files be silently ignored, or an error or warning be generated?

    (And code gets more and more complicated :)

Re^3: Creating a tarball
by kcott (Archbishop) on Feb 07, 2019 at 12:39 UTC

    G'day Tux,

    You raise a good point and, in general, my code is littered with such checks. However, in this instance, the directory structure is generated afresh immediately before the tarball creation, and the spec requires all files in the directory structure to be readable. So, while that is something I would normally do, it's not needed in this particular situation. Thanks for mentioning it anyway.

    — Ken