in reply to Re: Appending backslash to a string
in thread Appending backslash to a string
I have searched high and low for a solution to a similar problem I am grappling with. I am writing a complex Perl script, part of which attempts to escape all url forward slashes by preceding them with backslashes via regex. I am able to replace forward slashes with backslashes, using variations of the following:
But I want my output to look like the following:$test =~ tr [\\] [\/];
http:\/\/www.myurl.com\/me.html
Any advice would be extremely helpful. Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Appending backslash to a string
by haukex (Archbishop) on Jun 29, 2020 at 14:49 UTC | |
|
Re^3: Appending backslash to a string
by hippo (Archbishop) on Jun 29, 2020 at 15:46 UTC |