in reply to RE: RE: slash converter
in thread slash converter

Because I work in Perl exclusively on a win2k box, run scripts from that box daily that use the forward slash, and only use the forward slash b/c I hate writing \\\\ before a server, you can mark me a dissenter.

The forward slash absolutely works with an install of ActiveState 6.15 on a win2k box

Update:I did something like the original post in this thread here

-OzzyOsbourne

Replies are listed 'Best First'.
RE: RE: RE: RE: slash converter
by Fastolfe (Vicar) on Oct 13, 2000 at 22:30 UTC
    Of course, you can avoid escaping back-slashes by putting everything in single-quotes, but that makes variable interpolation somewhat messy.
      One of the (for me) more annoying gotchas. Inside a single-quoted string, \ is still special. '\\' is just a single \, and '\'' is a single-quote.

      So if you need to, by chance, wind up with \\, even with a single quote you still find yourself doing \\\\.

        Weird..
        $ cat test $var = 'c:\test\file.txt'; print "$var\n"; $ perl test c:\test\file.txt
        Update: My bad; I see what you're saying.. It needs to examine \ because you may need single-quotes in your single-quoted string.
        print '\\'; # prints "\" not "\\"