That makes more sense (The other version produced no output as expected).
You are comparing 9.0 to 9 as numbers instead of as text. They will be
equal in that sense even though you are using the eq instead of ==
comparison operator.
Ben
At 04:17 PM 7/2/01 -0700, David Rego wrote:
>Darn I shouldn't have done this - my mistake guys. Sorry. :( (I gotta be
>more careful.)
>
>Actually:
>if (9.0 eq 9) {
>print '(9.0 eq 9)'."\n";
>}
>
>caused that printing. I guess that is the behavior of Perl and not
ActivePerl.
>
>At 04:04 PM 7/2/2001, Frank Novak wrote:
>>I don't see this behavior, same version of perl.
>>
>>
>>
>> -----Original Message-----
>>
>> From: David Rego
>>
>> Sent: Mon 7/2/2001 4:02 PM
>>
>> To: [EMAIL PROTECTED]
>>
>> Cc:
>>
>> Subject: Newbie question
>>
>>
>>
>>
>>
>>
>>
>> Hi,
>>
>>
>>
>> Admittedly I'm not an advanced programmer in Perl, but I
>>
>>couldn't
>>
>> understand why:
>>
>>
>>
>> if ('9.0' eq '9') {
>>
>> print '("9.0" eq "9")'."\n";
>>
>> }
>>
>>
>>
>> cause the printing of:
>>
>>
>>
>> ("9.0" eq "9")
>>
>>
>>
>> in ActivePerl v5.6.1 built for MSWin32-x86-multi-thread build
>>
>>626.
>>
>>
>>
>> Tks
>>
>>
>>
>> Dr
>>
>>
>>
>>
>>
>> < http://www.Regos.net>
>>
>> < http://www.NikitaRego.com>
>>
>>
>>
>> _______________________________________________
>>
>> ActivePerl mailing list
>>
>> [EMAIL PROTECTED]
>>
>> http://listserv.ActiveState.com/mailman/listinfo/activeperl
>>
>>
>>
>>
>>
>>_______________________________________________
>>ActivePerl mailing list
>>[EMAIL PROTECTED]
>>http://listserv.ActiveState.com/mailman/listinfo/activeperl
>
><http://www.Regos.net>
><http://www.NikitaRego.com>
>
>_______________________________________________
>ActivePerl mailing list
>[EMAIL PROTECTED]
>http://listserv.ActiveState.com/mailman/listinfo/activeperl
>
>
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl