TIMTOWTDI.
#!perl -l my $var=9; my @sub=(0,map { sub { print $_ } } reverse 'a'..'j'); if ($var>=0 and $var<=$#sub) { $sub[$_] && $sub[$_]->() for reverse 1..$var; }
First they ignore you, then they laugh at you, then they fight you, then you win.
-- Gandhi
In reply to Re: fall through switch/case in perl (w/closure)
by demerphq
in thread fall through switch/case in perl
by ykar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |