Perl tr usage of regexp

时间:2016-04-04 16:38:45

标签: regex perl

i would like to ask about regex usage in Perl, extacly the tr///

So if i have an expression tr/abcde/abc the result will be abcab? How extacly the tr works?

1 个答案:

答案 0 :(得分:0)

tr/// has nothing to do with regular expressions. tr/// is documented in perlop.

my $x = "aabbccddee!";
$x =~ tr/abc/xyz/;
say $x;   # xxyyzzddee