I am not sure that this applies to command lines - if I put a file 
path with / in a variable, then pass that variable to a command line 
tool, I think that fails.  So I constantly have to put these kinds 
of variables in \\ form rather than s# before calling the CLT.  Actually 
what I do is to help with porting is set a variable to / or \\ based 
on what OS I am in, use that variable as a directory/file separator,
then use [\\/] in regexes that parse paths.  Hopefully there is 
a better way?

The same would probably be true for environment variables, which 
looks like what this Oracle thing is for.

At Friday, 8 February 2002, Curtis Poe <[EMAIL PROTECTED]> wrote:

>--- Allen Wang <[EMAIL PROTECTED]> wrote:
>> I want to change the string  "d:\orant\oracle" to "d:\\orant\\oracle"
>> 
>> Anyone know how to do this?
>> 
>> 
>> Thanks,
>> allen
>
>I'm not sure exactly what this stemmed from, so my comment may be out 
>of place, but Perl is
>portable and will let you use the forward slash in file paths.  
With an 
>absolute path it's not as
>useful, but a relative path such as "../images/foo.jpg" could be just 
>the same on a Windows box as
>a Linux box as a Mac Box...
>
>With that in mind:
>
>    $path =~ s{\\}{/}g;
>
>Cheers,
>Curtis "Ovid" Poe
>
>=====
>"Ovid" on http://www.perlmonks.org/
>Someone asked me how to count to 10 in Perl:
>push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//;
>shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A
>
>__________________________________________________
>Do You Yahoo!?
>Send FREE Valentine eCards with Yahoo! Greetings!
>http://greetings.yahoo.com
>
>-- 
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>








-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to