Whoa! Don't.
If you tell people what not to use, also tell them what to use instead ;-)
here: perl 5.10 introduces given/when, see perl5100delta. Short example:
use 5.010; given ($value) { when (1) { ... } when (2) { ... } default { die "Don't know what to do with '$_'" } }
It's not needed here, because a closure is much better, but in general it's surely good to know.
In reply to Re^2: Global vs. local?
by moritz
in thread Global vs. local?
by jpavel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |