Static has asked for the wisdom of the Perl Monks concerning the following question:
greetings monks --
trying to convert string '11/29/2001' to string '11\/29\/2001'.
i have attempted several conversions to no avail:
$dt =~ s/\//\\\//g $dt =~ s{/}{\/}g $dt =~ s{/}{\\/}g
all of my attempts thus far have failed to produce the desired result, all return either the original string or 11\\/29\\/2001.
i know this is an easy one, but it's trapped behind the cobwebs of many beers in my mind.
thanks for the help.
edited by footpad, ~Fri Nov 30 21:16:31 2001 (GMT)
Back to
Seekers of Perl Wisdom