On Fri, April 30, 2010 12:37 pm, Jim Gibson wrote:
> On 4/30/10 Fri  Apr 30, 2010  9:24 AM, "Paul" <opensou...@unixoses.com>
> scribbled:
>
>> OK, it was late at night, and working 7 days/week doesn't help.  Anyhow,
>> after looking at my convoluted script, I have one that works now, but am
>> now trying to figure out an easy way to change the "/" in the resultant
>> file to "\" to work in windows.  Always something.
>
> You may not have to. Many Windows programs that deal with paths will
> accept
> the '/' character as a path separator.
>
> If you do need to change '/' to '\':
>
>     $path =~ s{ / }{\\}gx;
>
> is probably the best way. Remember that the replacement string of the
> substitution operator is a double-quote string context, and '\' is a
> meta-character, so needs to be doubled. The x modifier ignores whitespace
> in
> the pattern part, but not the replacement part.
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>

I'll have to remember that when tr///d doesn't work!  Thanks.



-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to