Tony Heal wrote:
Below is a script I have been working on that verifies if another script has
created the MD5 hash file correctly. The
below works with
if ( $checkFile = $file )
This assigns the content of $file to $checkFile and executes the block if it's
content is not false (in the Perl sense).
but not if
if ( $checkFile != $file )
This numerically compares the contents of $file and $checkFile and executes the
block if they are the same number.
and I do not understand why that is.
Can someone explain what I am doing wrong?
You are using an assignment and a numeric compare where you should be using a
string compare. See `perldoc perlop` and search for 'Equality Operators'.
--
Just my 0.00000002 million dollars worth,
Shawn
"For the things we have to learn before we can do them, we learn by doing them."
Aristotle
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/