ananthbv has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have a program which takes in server name as a parameter, forms a connection string and calls a DBI->connect with that server name. The problem is if the server name has backslash inside it "\", it escapes it and as a result, the connection fails. Ex: $server = "SERVER05\LDEV" is converted to "SERVER05dev", the characters coming after the "\L" is changed to lower case.
I tried to find and replace \L to \\L or to space, but it does not seem to work. Is there a way to treat the string as 'raw', i.e., without escape chars? Kindly advise.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: replacing "\L" character in strings
by ww (Archbishop) on Jul 25, 2010 at 17:55 UTC | |
|
Re: replacing "\L" character in strings
by Marshall (Canon) on Jul 25, 2010 at 18:06 UTC | |
by ikegami (Patriarch) on Jul 26, 2010 at 16:12 UTC | |
by ananthbv (Initiate) on Jul 25, 2010 at 18:16 UTC | |
by Corion (Patriarch) on Jul 25, 2010 at 18:25 UTC | |
by ananthbv (Initiate) on Jul 25, 2010 at 22:09 UTC | |
by Marshall (Canon) on Jul 25, 2010 at 18:33 UTC | |
by ww (Archbishop) on Jul 25, 2010 at 20:03 UTC | |
|
Re: replacing "\L" character in strings
by ikegami (Patriarch) on Jul 26, 2010 at 16:15 UTC |