How can I use a variable as a search or replace selection using tr//? $_ = "be!happy"; $before="!; $after=" "; tr/$before/$after/; print $_;
I think it should print this: be happy Instead it prints: af!happy What can I do? Thanks, Cory
How can I use a variable as a search or replace selection using tr//? $_ = "be!happy"; $before="!; $after=" "; tr/$before/$after/; print $_;
I think it should print this: be happy Instead it prints: af!happy What can I do? Thanks, Cory