On May 19, 2006, at 10:10 PM, Chris Wagner wrote:

At 05:52 PM 5/19/2006 -0700, $Bill Luebkert wrote:
That's not the problem - he's only changing the first \.

His regex does need the g but he said he was getting output of
C:/path/with\new/content.  All slashes fixed except the one before n.
Carter are u sure u stated ur problem right? With the regex u posted ur output would be C:/path\with\new\content. How do u know the \n is becoming a newline? If perl were interpreting it that way then ur output would look
like
C:/path/with
ew/content

The n would be gone and replaced with a linebreak.  If that is indeed
happening then the source of it would be however u are getting that line of
data into ur script.  Not anything u do to it later.

The problem is his RE is:
        $root =~ s/\\/\//;
and should be:
        $root =~ s/\\/\//g;

Yes, you are correct. The line is printed at one point and I can clearly see that the line is C:/path/with\new/content, but when using this later it magically gets
interpreted as a newline.

Thanks to you and $Bill for the assistance. Fortunately, it appears that I merely
needed a 'g' to include all backslashes in the path.

Carter.


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

Reply via email to