my $s = '\\\\10.0.0.1\\path\\to\\foo'; print("$s\n"); # \\10.0.0.1\path\to\foo $s =~ tr/\\/\//; print("$s\n"); # //10.0.0.1/path/to/foo
You can use an alternate delimiter to make things a bit more readable.
my $s = '\\\\10.0.0.1\\path\\to\\foo'; print("$s\n"); # \\10.0.0.1\path\to\foo $s =~ tr{\\}{/}; print("$s\n"); # //10.0.0.1/path/to/foo
In reply to Re: transliteration of a string
by ikegami
in thread transliteration of a string
by Brad.Walker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |