$a = "A1"; $b = "B2"; printf("a: %s b: %s\n", $a, $b); $a =~ tr/[12]/[21]/; $b =~ tr/[12]/[21]/; printf("a: %s b: %s\n", $a, $b);
In reply to Re: replace a digit with another digit
by cowboy
in thread replace a digit with another digit
by kevyt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |