On Thursday 29 May 2008, Shmuel Fomberg wrote:
> 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

Maybe it's 

($hash->{a} == 7)
        and
(
        ( $hash->{b} == 256)
                ,
        "Struct: Build: correct elements"
)

So the comma is part of the right clause?

Regards,

        Shlomi Fish

-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
The Case for File Swapping - http://xrl.us/bjn7i

The bad thing about hardware is that it sometimes work and sometimes doesn't.
The good thing about software is that it's consistent: it always does not
work, and it always does not work in exactly the same way.
_______________________________________________
Perl mailing list
[email protected]
http://perl.org.il/mailman/listinfo/perl

Reply via email to