RCRPG/Raku: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: GLR updates, edited works with) |
Thundergnat (talk | contribs) m (→Code: Update for stricter whitespace rules) |
||
Line 23: | Line 23: | ||
As with the [[RCRPG/Perl|Perl version]]. |
As with the [[RCRPG/Perl|Perl version]]. |
||
==Code== |
==Code== |
||
{{works with|Rakudo| |
{{works with|Rakudo|2018.03}} |
||
<lang perl6>my %commands; |
<lang perl6>my %commands; |
||
my %rooms; |
my %rooms; |
||
Line 67: | Line 67: | ||
} else { |
} else { |
||
say "There are exits: {@$.links.join(', ')\ |
say "There are exits: {@$.links.join(', ')\ |
||
.subst(/','(<-[,]>+)$/,->$/{" and$0"})}."; |
.subst(/','(<-[,]>+)$/, -> $/ {" and$0"})}."; |
||
} |
} |
||
if $.stuff { |
if $.stuff { |