Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^2: Strange problem with Windows 7 command line and perl

by VinsWorldcom (Parson)
on Feb 12, 2017 at 15:59 UTC ( #1181822=note: print w/replies, xml ) Need Help??

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

Strawberry comes with GCC and it's in the C:\strawberry\c\bin directory by default. Windows is not case sensitive.

  • Comment on Re^2: Strange problem with Windows 7 command line and perl

Replies are listed 'Best First'.
Re^3: Strange problem with Windows 7 command line and perl
by ww (Archbishop) on Feb 12, 2017 at 23:20 UTC

      The problem is that the OP'd path excerpt not only had the \c\ version, which you are focusing on; it also had c:\strawberry\perl\bin, which is the full path used in the "that works fine" post, so if that really was the path, it should have been found.

      Unfortunately, we've only ever seen that original snippet of anonypl's "path variable", and do not know whether that was a copy/paste from the windows "Environment Variables" dialog box (and if so, whether it was from the user variables or system variables section), or whether that was a partial copy/paste from the actual cmd.exe prompt, with either a path or an echo %PATH% issued.

      I am curious whether powershell is finding the same perl executable that the full-path does from cmd.exe. If anonypl could run something similar to the following, we may learn more.

      cmd.exe C:\Users\pryrt>powershell Windows PowerShell Copyright (C) 2016 Microsoft Corporation. All rights reserved. PS C:\Users\pryrt> (get-command perl.exe).path c:\usr\local\apps\berrybrew\perls\5.24.0_64\perl\bin\perl.exe PS C:\Users\pryrt> exit C:\Users\pryrt>where perl c:\usr\local\apps\berrybrew\perls\5.24.0_64\perl\bin\perl.exe c:\usr\local\apps\berrybrew\perls\5.24.0_64\perl\bin\perl.exe C:\Users\pryrt>echo %PATH% ...;c:\usr\local\apps\berrybrew\perls\5.24.0_64\c\bin;c:\usr\local\app +s\berrybrew\perls\5.24.0_64\perl\bin;c:\usr\local\apps\berrybrew\perl +s\5.24.0_64\perl\site\bin;...

      And if you're wary of revealing something in your PATH, feel free to ellide, like I did. Or use the known location of perl to help you snip it, so we don't accuse you of deleting something helpful:

      c:\usr\local\apps\berrybrew\perls\5.24.0_64\perl\bin\perl.exe -le "pri +nt for grep { /perl/ } split /;/, $ENV{PATH}" c:\usr\local\apps\berrybrew\perls\5.24.0_64\c\bin c:\usr\local\apps\berrybrew\perls\5.24.0_64\perl\bin c:\usr\local\apps\berrybrew\perls\5.24.0_64\perl\site\bin

      Though on your system, you should use your known-good path to perl, which according to the aforementioned "works fine" post, should be as follows. Oh, right, and search for perl or berry:

      C:\Strawberry\perl\bin\perl\perl.exe -le "print for grep { /perl|berr +y/ } split /;/, $ENV{PATH}"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1181822]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2018-10-16 16:21 GMT
Find Nodes?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...

    Results (86 votes). Check out past polls.