tkjordantk
Programmer
- May 19, 2008
- 5
I've been trying to replace a ":" with "X" using tr. With the code:
if ( index( $test_string, ":" ) == -1) {
$test_string =~ tr/:/X/;
}
I'm sort of new to perl, I was thinking that maybe it was a special character, so I tried to using "\", but that didn't work. Any ideas?
Thanks.
if ( index( $test_string, ":" ) == -1) {
$test_string =~ tr/:/X/;
}
I'm sort of new to perl, I was thinking that maybe it was a special character, so I tried to using "\", but that didn't work. Any ideas?
Thanks.