How do you calculate MD5? You don't show that subroutine. Are you aware that Digest::MD5 is CORE?my $md5chksum = &calcMD5( $save_file );
You should also be aware that invoking subroutines with the & sigil shows different behavior than calling a subroutine without it -- see Prototypes in perlsub. It can also interfere with optimization -- see Constant Functions in the same document.
Rather than invoking a system command, you can use unlink.my $cmd = "rm $save_file"; # `$cmd`;
It's generally good practice to use lexical file handles, since barewords are globals. Search for "lexical" in open.open ( MD5, '+>>', $md5File ) || &loggingError("Couldn't open md5 file ($md5File) for + reading : $!"); $md5row = <MD5>; close( MD5 );
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re: Can't update file
by kennethk
in thread Can't update file
by TClayJ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |