On Tue, 06 May 2008 18:04:00 +0200, Jenda Krynicky wrote:
> From: Robert Hicks <[EMAIL PROTECTED]>
>> Is there anything wrong with:
>>
>> if ( defined $one && defined $two && $one eq $two ) {
>> do something
>> }
>
> As far as I can tell not. I was afraid the operator precedence might
>
Jenda Krynicky wrote:
From: Robert Hicks <[EMAIL PROTECTED]>
Is there anything wrong with:
if ( defined $one && defined $two && $one eq $two ) {
do something
}
As far as I can tell not. I was afraid the operator precedence might
play tricks with it, but looks like it doesn't:
V:\>
From: Robert Hicks <[EMAIL PROTECTED]>
> Is there anything wrong with:
>
> if ( defined $one && defined $two && $one eq $two ) {
> do something
> }
As far as I can tell not. I was afraid the operator precedence might
play tricks with it, but looks like it doesn't:
V:\>perl -MO=Deparse
On Tue, May 6, 2008 at 9:49 AM, Robert Hicks <[EMAIL PROTECTED]> wrote:
> Is there anything wrong with:
>
> if ( defined $one && defined $two && $one eq $two ) {
> do something
> }
No. Its fine.
You might be interested in "Operator Precedence and Associativity" [1]
[1] http://perldoc.pe