Do you know Syntax::Keyword::Match? If you are interested in switch statement, you can get inspiration from this module.
use v5.14;
use Syntax::Keyword::Match;
my $n = ...;
match($n : ==) {
case(1) { say "It's one" }
case(2) { say "It's two" }
case(3) { say "It's three" }
case(4), case(5)
{ say "It's four or five" }
default { say "It's something else" }
}
match($n){case(1:==){say"It's one"}case(2:==){say"It's two"}case(3:==){say"It's three"}case(4:>=){say"It's four or greater"}default{say"It's something else"}}
Do you know Syntax::Keyword::Match? If you are interested in switch statement, you can get inspiration from this module.
No I did not, but I will investigate. Thank you.
Not exactly what I'd want. I'd rather see:
If you want to write so, Syntax::Keyword::Match is insufficient.