http://www.perlmonks.org?node_id=394297


in reply to A "but" operator.

"But" is not a conditional operator like "and", it's actually two seperate statements with an implied mutual exclusivity between them. What "but" would return in scalar or array context is up for debate, but it's probably something like:

sub but() { my ($x,$y) = @_; die "that's unpossible!" if (!$x && $y) return $x; }

Interesting thread, but I agree with your girlfriend ... it's totally useless :)