in reply to (Ovid) Re: Evolution of a Perl Programmer (new backup script)
in thread Evolution of a Perl Programmer (new backup script)
You could, of course, mitagate this by writing
system("/bin/rm", $ERRORFILE) if -e $ERRORFILE;
Notice also that I reworked your use of system() to pass two arguments rather than one. This avoids the often unavoidable, albeit small, overhead of having system() check for shell metacharacters.
Better, I think, to write
unlink($ERRORFILE) or die "$ERRORFILE: $!"
if -e $ERRORFILE;
|
|---|