in reply to Re: Simple Switch statement
in thread Simple Switch statement

FWIW, I usually write this:
if (defined($value) && exists($switch{$value})) { $switch{$value}->(); } else { $switch{'default'}->(); # I assume $pages was a mistake }
as:
($switch{$value} || $switch{'default'})->();

Liz