小编vik*_*s81的帖子

在使用/ d理解perl tr命令方面需要帮助

我在网上看到了以下Perl示例.

#!/usr/bin/perl 

$string = 'the cat sat on the mat.';
$string =~ tr/a-z/b/d;

print "$string\n";
Run Code Online (Sandbox Code Playgroud)

结果:

b b   b.
Run Code Online (Sandbox Code Playgroud)

有人可以解释一下吗?

perl translate

7
推荐指数
1
解决办法
748
查看次数

标签 统计

perl ×1

translate ×1