NeverMore has asked for the wisdom of the Perl Monks concerning the following question:
$file2 = param('file'); # A windows path is supposed to be filled here + (c:/foo/bar.txt) <br>print "$file2\n"; # c:foobar.txt is printed <br>$file2 =~ s[\\][/]g; # It's too late to substitute.
As you can see, this is quite a pickle. How do I fix this?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: / to \ substitution
by zodiac (Beadle) on May 31, 2000 at 16:52 UTC | |
by NeverMore (Acolyte) on Jun 01, 2000 at 05:31 UTC | |
|
RE: / to \ substitution
by mdillon (Priest) on May 31, 2000 at 06:03 UTC | |
|
Re: / to \ substitution
by comatose (Monk) on May 31, 2000 at 07:10 UTC | |
by NeverMore (Acolyte) on May 31, 2000 at 07:30 UTC | |
by NeverMore (Acolyte) on May 31, 2000 at 08:02 UTC | |
by ZZamboni (Curate) on May 31, 2000 at 08:16 UTC | |
|
Re: / to \ substitution
by NeverMore (Acolyte) on May 31, 2000 at 06:20 UTC | |
|
Re: / to \ substitution
by NeverMore (Acolyte) on May 31, 2000 at 06:24 UTC | |
by mdillon (Priest) on May 31, 2000 at 07:01 UTC |