[Israel.pm] Useless use of eq

Shmuel Fomberg semuelf at 012.net.il
Thu May 29 23:55:10 EEST 2008


Hi All.

Can anyone tell me why this line is OK:
ok( ( $hash->{a} == 7 ) && ( $hash->{b} == 256 ) ,
"Struct: Build: correct elements");

While this line:
ok( ( $hash->{a} == 7 ) and ( $hash->{b} == 256 ) ,
"Struct: Build: correct elements");
cause a warning:
Useless use of numeric eq (==) in void context
?

Shmuel.


More information about the Perl mailing list