my $foo = '123-4567'; $foo =~ tr/-//d; # tr is specifically for the replacement # of single characters, the "d" tells it # to remove any characters for which # is no translation provided. print $foo;
In reply to Re: removing a character from a string
by Sifmole
in thread removing a character from a string
by bobothesmart
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |