in reply to windows perl and paths

Did you try it without the escaping backslashes? I find when I'm coding on Windows, I only need to escape a backslash in a path. Forward slashes seem to work ok without escape, so that's all I use. What version of Perl?

Replies are listed 'Best First'.
Re^2: windows perl and paths
by flieckster (Scribe) on Nov 19, 2016 at 19:23 UTC
    I'm on strawberry perl, the other way and it can't find the directory at all.

      So you're saying that you get the specified warning when you try to chdir to Z:/Partners/Wilsons/2push_test?

      Can you, from the command line, cd Z:\Partners\Wilsons\2push_test successfully?

      These are all Strawberry Perl installs, that I ran this code against:

      use warnings; use strict; use feature 'say'; use Cwd; say getcwd(); chdir 'c:/repos' or die $!; say getcwd();

      Output:

      c:\>berrybrew exec perl chdir.pl Perl-5.24.0_64 ============== c:/ c:/repos Perl-5.22.2_64 ============== c:/ c:/repos Perl-5.18.4_64 ============== c:/ c:/repos Perl-5.10.1_32 ============== c:/ c:/repos

      So using forward slashes without escaping them most definitely works all the way back to at least 5.10.