Just for kicks you could write
my $suffix = sub { given ($type) { when ("csv") { return "txt" } when ("xml") { return "xml" } }}->();
(in which case you can't use continue, of course)
In reply to Re: functional "given...when..."?
by almut
in thread functional "given...when..."?
by perl5ever
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |