in reply to / to \ substitution
if you need to keep the original value you can do$file2 = param('file'); # A windows path is supposed to be filled h +ere (c:/foo/bar.txt) $file2 =~ s%\\%/%g; # It's not too late to substitute here. $file2 =~ s%.*:%%; # also cut off c: print "$file2\n"; # c:foobar.txt is printed
($file3 = $file2) =~ s%what%ever%g;
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: Re: / to \ substitution
by NeverMore (Acolyte) on Jun 01, 2000 at 05:31 UTC |