|
Fabio Lecca
|
posted 1/8/04 4:58 PM
hi,i modified the code and it works on windows, 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}byeFabio
|