Rot-13: Difference between revisions

Content added Content deleted
No edit summary
(→‎{{header|Raku}}: use rotate method)
Line 4,632: Line 4,632:
=={{header|Raku}}==
=={{header|Raku}}==
(formerly Perl 6)
(formerly Perl 6)
<syntaxhighlight lang="raku" line>put .trans: ['A'..'Z','a'..'z'] => ['N'..'Z','A'..'M','n'..'z','a'..'m'] for $*IN.lines</syntaxhighlight>
<syntaxhighlight lang="raku" line>my @abc = 'a'..'z';
my $abc = [@abc».uc, @abc];
put .trans: $abc => $abc».rotate(13) for lines</syntaxhighlight>


Input:
Input: