in reply to Re: Removing characters
in thread SOLVED Removing characters

What should I be using instead of TR?

Replies are listed 'Best First'.
Re^3: Removing characters
by moritz (Cardinal) on Jan 22, 2008 at 15:02 UTC
    You can use tr, but you have to discard its return value.
    my $str = "ab c,d.e"; $str =~ tr/ ,.//; # here $str is "abcde"
    So you need to use the modified string after the tr. And don't try to stuff it all in one line ;-)

    (Update: fixed match operator)