Perl doesn't do much automatic convert of / to \ on Win32. I think it is actually more common that some modules convert \ to / when on Win32 so that the rest of their code doesn't have to deal with \ directory separators.
The fact is that Win32 allows / as a directory separator in almost all places. The few exceptions I have found include
- Many programs that use / for command-line options (such as most programs from Microsoft) won't let you use / as a directory separator for file names on their command line.
- The standard "open file dialog" controls don't allow / as a directory separator.
- The DefineDosDevice() API call doesn't allow the use of / in the definition of a "raw target path".
So, in Perl on Win32, you will only very rarely run into problem using / as a directory separator except if you try to use it on some other program's command line.
Unfortunately, there are also some fairly rare cases where using \ as a directory separator will cause you problems in Perl, so there isn't just one simple solution.
-
tye
(but my friends call me "Tye")
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.