For Programmers: Free Programming Magazines  


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









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 Re: How to replace the "\" in "C:\myrootr\folder" with "/&qu
Gunnar Hjalmarsson

2007-06-26, 10:03 pm

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


That needs to be written

my $test = "C:\\myroot\\folder";

or

my $test = 'C:\myroot\folder';

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Sponsored Links







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

Copyright 2008 codecomments.com