goto (undef, 'CASE01' .. 'CASE10')[abs($var) == $var ? $var+0 : 0]||"d +efault"; CASE10: print "a"; CASE09: print "b"; CASE08: print "c"; CASE07: print "d"; CASE06: print "e"; CASE05: print "f"; CASE04: print "g"; CASE03: print "h"; CASE02: print "i"; CASE01: print "j"; print "\n"; default:
In reply to Re^8: ** fall through switch/case in perl
by Beechbone
in thread fall through switch/case in perl
by ykar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |