"\" is special in string literals. You need to escape it.
$server = "SERVER05\\LDEV"; # Produces SERVER05\LDEV $server = 'SERVER05\\LDEV'; # Produces SERVER05\LDEV $server = 'SERVER05\LDEV'; # Produces SERVER05\LDEV
The third works since "\" only needs to be escaped when it's followed by another "\" or the string delimiter (') in single quoted strings.
In reply to Re: replacing "\L" character in strings
by ikegami
in thread replacing "\L" character in strings
by ananthbv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |