in reply to Please explain the '$x ||' idiom
$x = 0; $x = $x || 5; # prints 5 print $x; $x = 4; $x = $x || 5; $prints 4 print $x; $x = $x || 5; # prints 5 print $x;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Please explain the '$x ||' idiom
by Fletch (Bishop) on Jan 18, 2005 at 18:28 UTC |