in reply to Re^4: Is Perl a good career move?
in thread Is Perl a good career move?
($foo = bar()) || ($foo = $baz);
$foo = (($bar = bar()) ? $bar : $baz);
The key is that the || casts the right hand side as a boolean, and php does not have a magic variable that gets set while you aren't looking.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Is Perl a good career move?
by Juerd (Abbot) on Jan 04, 2008 at 00:46 UTC |
In Section
Meditations