in reply to Strange problem with Windows 7 command line and perl

Hi All,

Interesting observation. I am able to execute the command if I drop to PowerShell

PS C:\Users\pmu> perl --version This is perl 5, version 24, subversion 1 (v5.24.1) built for MSWin32-x +86-multi-thread-64int Copyright 1987-2017, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge. PS C:\Users\pmu>

Replies are listed 'Best First'.
Re^2: Strange problem with Windows 7 command line and perl
by marto (Cardinal) on Feb 12, 2017 at 16:19 UTC

    You need to start a new command line after any changes to these environment variables , hencyh why it work from your new powershell instance.

      Yep. Windows has an 'interesting' way of handling environment variables. One has to go pretty low-level with the Windows API to attempt to make it "Do The Right Thing", but it's just far easier to close the cmd window and open a new one. With that said, similar action can be seen on *nix as well in many cases...

      This isn't a Strawberry Perl issue. It'll happen with any software that changes ENV.