411 REFERENCE · Wikibooks
Perl Programming/Keywords/tr
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Perl times truncate Keywords
The tr keyword
tr is the transiteration operator and equivalent to y.
Syntax
tr///
Examples
The code
$tmp = "909135790159";
print $tmp . "\n";
$tmp =~ tr/13579/24680/;
print $tmp . "\n"; replaces the respective characters in the first parametre with the corresponding characters in the second parametre: 909135790159
000246800260
See also
y
Perl times truncate Keywords