in reply to Re: Checksum Help
in thread Checksum Help

Hi Jethro, Thanks for the quick response. When you say "remove the loop and the line before the loop" are you referring to the for loop and the line beginning with scalar? Sorry for the confusion, I am still very new to perl and programming in general, but I'm making headway in learning!

Replies are listed 'Best First'.
Re^3: Checksum Help
by jethro (Monsignor) on Jul 07, 2009 at 21:10 UTC

    Yes, the line before the loop checks whether the script got any parameters when it was called (the parameters are automatically stored in the array @ARGV when the script is started). If not, it gives a helpful message how to call the script and stops. If the script has parameters it loops through all the parameters and opens each one of them and prints the crc of each file

    So if you only want one fixed file checked, you obviously don't need the loop and don't need to check for any parameters. Otherwise just keep the script and call it with the file paths as parameter