ex: A1 changed to A2 A2 changed to A1 Thanks $m = "A1"; or $m = "A2"; This wont work: $m =~ tr(/1/2/ | /2/1/); This works, but I dont like it: if ($m =~ /1/){ $machine =~ s/1/2/g; } else{ $m =~ s/2/1/g; }
In reply to replace a digit with another digit by kevyt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |