Boga Srinivas wrote:
Hi Hoffman,

When you are trying to do a numeric comparsion on strings.

The interpreter will try to convert them to numbers and then do a comparsion.

if it cannot convert to numbers they are made 0's and then it will compare.

for more info please refer to this url:

http://www.perlmeme.org/howtos/syntax/comparing_values.html

cheers!

-srini

Hoffmann wrote:
Could some one explain how, in the example below, $name and $goodguy are equal numerically?

$name     = 'Markkkk';

$goodguy = 'Tony';

if ($name == $goodguy) {
       print "Hello, Sir.\n";
} else {
       print "Begone, evil peon!\n";
}

Thanks,
Hoffmann



Srini:

Thanks for the link!

Hoffmann

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to