$foo = $x || $y || $z; #This is much faster (and shorter to say) than: if ($x) { $foo = $x; } elsif ($y) { $foo = $y; } elsif ($z) { $foo = $z; }