in reply to replace a digit with another digit
$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);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: replace a digit with another digit
by davido (Cardinal) on Aug 17, 2005 at 19:21 UTC | |
by cowboy (Friar) on Aug 17, 2005 at 19:30 UTC |