SWITCH: for ($where) { /In Card Names/ && do { push @flags, '-e'; last; }; /Anywhere/ && do { push @flags, '-h'; last; }; /In Rulings/ && do { last; }; die "unknown value for form variable where: `$where'"; }
elsif
s, a switch should always have a default
case, even if the default case `can't happen'.Forward to Switch by Using do{} Creatively
Back to Closures
Up to index
Copyright © 1998, Tom Christiansen
All rights reserved.