Your post sounded so good, I ++'d it, but it's wrong.
#!/usr/bin/perl -w my $DBH ||= retval('1'); print "$DBH\n"; sub retval { return $_[0] }
This prints '1'.
Update: Oddly enough, Camel 3 calls 'my' a named unary operator and lists named unary operators at higher precedence than any of assignment, assignment operators or logical operators, so you should be right, but the code doesn't work that way for me, at least not on 5.8.0 or 5.005_03.
Newer Update: 'my' probably does have higher precedence thatn ||=, but it doesn't matter because it returns false.
my $orr || print "or\n"; my $andd && print "and\n";
prints 'or'.
--Bob Niederman, http://bob-n.comIn reply to Re: Re: Re: Re: accessing Apache::DBI 'cached connections'
by bobn
in thread accessing Apache::DBI 'cached connections'
by geektron
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |