system( 'unzip', $ZIP, '-d', $TMP ); # instead of 'system "unzip $ZIP -d $TMP"' #### $ZIP =~ s/([^\w.-])/\\$1/g; for $BADFILE ( @BADFILES ) { if ($BADFILE=~s/:.*FOUND$//) { $BADFILE=substr($BADFILE,length($TMP)+1); $BADFILE =~ s/([^\w.-])/\\$1/g; $RESULT = `zip -d $ZIP $BADFILE`; print $RESULT; } ...