ROT13の取得
trを使います。
ROT13についてはWikipadiaの説明をご覧下さい。
use strict; my $text = 'This is a pen.'; print get_rot13_text($text), "\n"; sub get_rot13_text { my $word = shift; $word =~ tr/A-Za-z/N-ZA-Mn-za-m/; return $word; }
use strict; my $text = 'This is a pen.'; print get_rot13_text($text), "\n"; sub get_rot13_text { my $word = shift; $word =~ tr/A-Za-z/N-ZA-Mn-za-m/; return $word; }