sub single_true { my $count = 0; $_ && $count++ foreach @_; return $count == 1; } if (single_true($x, $y, $z)) { ... }
In reply to Re: One out of three ain't bad
by ikegami
in thread One out of three ain't bad
by saintmike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |