http://qs1969.pair.com?node_id=549320


in reply to Re: AND OR
in thread AND OR

(for keyword or further-search purposes) that behavior is dubbed "short-circuiting"

And i'll toss in a good C example (avoid method calls on undef/null):
int *x; if(ptr != NULL && *ptr==5){ ... } if( objPtr != NULL && objPtr->foo() ){ ... } # extended to perl: my $obj = Foo::Bar->new(); if( $obj && $obj->blah() ){ ... }
Update: added parens for ->foo()