Paul Fenwick <pjf <at> perltraining.com.au> writes:
>for ($foo) {
> when ($_ < 500) { ++$_ }
> when ($_ > 1000) { --$_ }
> default { say "Just right $_" }
>}
Ahh... that's exactly what I was looking for. Thanks.
Makes you wonder why the 'given' keyword was added, when for/when is so close...
--
Ed Avis <eda@waniasset.com>