|
Fabio Lecca
|
posted 1/8/04 4:52 PM
Hi, I changed the ExecHash function and now I am able to use it on Windows... here is the code, hope it helps...sub ExecHash{local($HASHFunc, $filename) = @_;local $filesig; unless ( defined $HASHFunc ) { &Error("invalid command $HASHFunc given"); } if (open (HASHIN, "$HASHFunc \"$filename\"|") ) { $filesig = <HASHIN>; close HASHIN; } unless ( $filesig ) { #&Error("$HASHFunc was unable to read $filename, or was unable to execute\n"); printf("$HASHFunc was unable to read $filename, or was unable to execute\n"); $filesig = "NOCRC"; } # Chop the <CR> off the end, do I trust the chpo function? # depends on the OS... $filesig =~ s/\n$//; return $filesig}Fabio
|