manishrathi has asked for the wisdom of the Perl Monks concerning the following question:
I am saving this code as invertSlash.pl. When I execute this code, I am getting following output$test = "C:\first\second";<br><br> print $test;<br> print"\n\n";<br> $test =~ s/\\/\//g;<br> print $test;
C:\Users\Admin\Desktop\perl_programs>perl invertSlash.pl<br> C:irstsecond<br><br> C:irstsecond
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: replacing backward slash with forward slash
by davido (Cardinal) on Aug 19, 2011 at 08:33 UTC | |
| |
|
Re: replacing backward slash with forward slash
by Anonymous Monk on Aug 19, 2011 at 08:23 UTC | |
|
Re: replacing backward slash with forward slash
by pvaldes (Chaplain) on Aug 19, 2011 at 13:54 UTC | |
by Gulliver (Monk) on Aug 19, 2011 at 14:44 UTC | |
by DStaal (Chaplain) on Aug 19, 2011 at 16:45 UTC |