in reply to Re^2: 5.8.8 stat and file test fails
in thread 5.8.8 stat and file test fails

Must be a Werewolf :) Try this
$DEBUG = 1; # if its 0, or undef, no printing printf "zip_file hex [%s]\n", unpack 'H*', "$ccp_home/$new_file" if $D +EBUG; warn "WARNING zip_file has unprintable characters\n" if "$ccp_home/$new_file" =~ /[:^print:]/; printf "zip_file [%s]\n", "$ccp_home/$new_file" if $DEBUG;
the hex version because there might be non-printable characters in filename.

Replies are listed 'Best First'.
Re^4: 5.8.8 stat and file test fails
by emwdrich (Initiate) on Aug 19, 2008 at 14:54 UTC

      It looks like a trailing carriage return. Rip it out this way:

      $new_file =~ tr/\r//d;

      You could get rid of every unprintable character like this:

      $new_file =~ s/[:^print:]//g;
        Safer I think just trailing :)
        s~[:^print:]+?$~~;
        $new_file =~ tr/\r//d;
        This line took care of the issue. Thanks for the help.