in reply to Trouble using a Win32 file path in an array
Perl on windows can use "/" instead of the windows backslash in path names just fine. So when calling a Perl function on Windows, C:/dir/dir2 is just fine.A Perl function under Windows will also return forward slash names instead of backslash names.
You need the backslash when you go to the windows shell (with backticks, etc), but otherwise use the forwardslash "/". The code is more portable and this solves some problems when running regex'es on pathnames since you don't have to worry about "escaping" the backslash with yet another backslash.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trouble using a Win32 file path in an array
by ikegami (Patriarch) on Sep 28, 2009 at 02:20 UTC | |
by Marshall (Canon) on Sep 28, 2009 at 18:14 UTC | |
by ikegami (Patriarch) on Sep 30, 2009 at 20:52 UTC | |
by Marshall (Canon) on Sep 30, 2009 at 23:22 UTC | |
by ikegami (Patriarch) on Oct 01, 2009 at 03:28 UTC | |
by ikegami (Patriarch) on Sep 28, 2009 at 18:27 UTC | |
by Anonymous Monk on Sep 29, 2009 at 05:08 UTC | |
|
Re^2: Trouble using a Win32 file path in an array
by Anonymous Monk on Sep 28, 2009 at 01:10 UTC |