use feature "switch";
given($_) {
when (/^abc/) { $abc = 1; }
default { $nothing = 1; }
}
See http://perldoc.perl.org/perlsyn.html#Switch-statements
A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.
use feature "switch";
given($_) {
when (/^abc/) { $abc = 1; }
default { $nothing = 1; }
}