my $bar = (0,'low','med','high')[$foo=~tr/I//] || 'drat'; # or my $bar; $bar = (0,'low','med','high')[tr/I//] || 'drat' for $foo;
In reply to Re: switch, transliteration ( tr/// ) of $_ issue
by runrig
in thread switch, transliteration ( tr/// ) of $_ issue
by whakka
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |