| Windows File Paths in Perl |
|
|
|
|
One of the coolest features in Perl is that it conforms the slashes in a file path automatically. This really comes in handy when scripting for Windows since the backslashes used in file paths escape the following character and \\\\server\\share looks dumb.
Since Perl will turn the slashes around, all you need to type is: //server/share When there are spaces in a directory name, the path is even harder to read: \\\\server\\share\\user\ used\ spaces\\to \create\\this\\directory Using quote replacement with q helps even further: q[ //server/share/user used spaces/to create/this/directory ] |


