Hi,

I've got a script that reads in the contents of a file and then parses out the interesting bits for later use. One of the interesting bits is a key value pair that's the root to a directory which I'll need to access. It looks like so:


Root:   C:\path\with\new\content

The problem is the part of the path is being interpreted as having a newline
in it. (...\new\content).

foreach (@file) {
        chomp;
        if(/^Root:/) {
                m/^Root:\s+(.*)$/;
                $root = $1;
                $root =~ s/\\/\//;  # change backslash to forward.
        }
}

Even after using the substitute backslash to forward slash I still end up
with this:

C:/path/with\new/content
                     ^^

Any ideas on how to treat the "\n" as just characters and not a newline?

Thanks!

Carter.

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to