For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > June 2007 > How to replace the "\" in "C:\myrootr\folder" with "/"









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to replace the "\" in "C:\myrootr\folder" with "/"
sv2021@gmail.com

2007-06-26, 10:03 pm

Hi,
Can someone help me. I know this should be easy but I coulnt get it
working.

I want to replace the "\" backslash character in a string e.g: my
$test = "C:\myroot\folder"; with forward slash "/"

This is what my snippet, which seems to be not doing anything....
$test =~ s|\|/|g;

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com