in reply to RE: Re: / to \ substitution
in thread / to \ substitution

Actually, try this as well:
use CGI qw(:all); $debug = 1; $file2 = param('file') unless $debug; $file2 = 'c:\foo\bar.txt' if $debug; print "$file2\n"; $file2 =~ s[\\][/]g;
This debug thing really was a neat thing, btw.

-NM

Replies are listed 'Best First'.
RE: RE: RE: Re: / to \ substitution
by ZZamboni (Curate) on May 31, 2000 at 08:16 UTC
    I must be missing something, because I don't see what the problem is. The substitution is working correctly, as you will see if you add a second print "$file2\n"; at the end. What is it that you are trying to achieve?

    --ZZamboni