Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Can't find or uninstall version of perl

by ScarletObsidian (Novice)
on May 19, 2019 at 06:37 UTC ( #11100237=perlquestion: print w/replies, xml ) Need Help??

ScarletObsidian has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I have an annoying problem that I've been wrestling with for the last few hours. It's one of those tiny, but very annoying things that completely hamstrings you, while also being entirely orthogonal to the work you actually need to accomplish. It appears that I have two version of Perl somewhere on my machine and that it's causing a whole bunch of problems. I want to use the last Strawberry Perl, and would love to delete the older version 5.26.2 in favor of 5.28.2.1 (64 bit), but I can't find 5.26.2 on my computer! When I enter "which perl" into terminal, it tells me that the path is /usr/bin/perl, but I can't find that path anywhere on my computer. Even if I could, I realize that I don't know how to go about uninstalling a version of perl that doesn't seem to have come from a standard distribution like Strawberry.

Please help me overcome this so I can go back to trying to solve my actual problem! I just want to delete this old version of perl so that I can do everything with the new version.

Thanks in advance.

  • Comment on Can't find or uninstall version of perl

Replies are listed 'Best First'.
Re: Can't find or uninstall version of perl
by Athanasius (Archbishop) on May 19, 2019 at 06:51 UTC

    Hello ScarletObsidian, and welcome to the Monastery!

    You should have a look at the contents of your PATH environment variable: set path. That should tell you where the older perl is hiding.

    However, since you’re using Strawberry Perl, you don’t need to uninstall anything. Just download a “Portable edition” of the perl you want (see http://strawberryperl.com/releases.html), unpack it to a suitable location, and run it via the batch file provided — and, hey presto!, it will just work. (The batch file adjusts the local PATH setting for the terminal it runs in.)

    Hope that helps,

    Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

      Thanks so much for your quick reply! I'll check out the path variable and see if I can't find the ...hidden perl...that's causing me confusion, but portable strawberry perl definitely got me up and running again.

      S.O.

Re: Can't find or uninstall version of perl
by swl (Vicar) on May 19, 2019 at 07:12 UTC

    /usr/bin/perl is not a standard Windows path, and which is not a standard Windows utility.

    Are you using cygwin or similar for the console? If so then the other perl will be somewhere in its directory structure, and should probably be left alone (particularly since you have a working solution using the portable Strawberry perl - 11100238).

      That's really strange. Why would "which" work at all if it doesn't come standard. I'm not, to my knowledge, using cygwin or anything like it. I have installed git, github, and various python utilities -- could one of those have brought "which" into the system?
        I have installed git, github, and various python utilities ...

        Pythonista gits tend to like *nix-ish utilities, so I wouldn't be surprised if one of those installs smuggled the Windows port of the GNU utilities aboard. From my Windows system:

        c:\@Work\Perl\monks>which which.exe c:\UnxUtils\wbin\which.exe


        Give a man a fish:  <%-{-{-{-<

        Are you using the git-bash console ?

        There you'll have which and a Perl installation and Unix paths notation.

        That doesn't effect the normal cmd.exe unless you change PATH to point to the git utilities. ( I never tried this)

        Anyway perldoc -l MODUL will point you to your Perl's installation directory.

        For instance the doc location of a core module like warnings always works.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        update

        s/-t/-l/

        update

        Fired up my Win box and inside cmd.exe it works

        D:\>perldoc -l warnings C:\Perl_524\lib\warnings.pm

        But seems that git-bash comes without perldoc

        $ perldoc -l warnings Can't locate Pod/Perldoc.pm in @INC ...

        But the following works on both variations, provided you swap ' and " accordingly for cmd.exe

        $ perl -Mwarnings -e 'print $INC{"warnings.pm"}' /usr/share/perl5/core_perl/warnings.pm

        D:\>perl -Mwarnings -e "print $INC{q'warnings.pm'}" C:/Perl_524/lib/warnings.pm
        ANYWAY DON'T TRY TO UNINSTALL git's Perl.
        I'm not, to my knowledge, using cygwin or anything like it.

        But you do have Cygwin or something like it (maybe msys ?). Nothing else is going to report a path that begins with "/usr/bin".

        I have both Cygwin and Msys:
        C:\>which which 'which' is not recognized as an internal or external command, operable program or batch file. C:\>set PATH=C:\_64\msys64\usr\bin;%PATH% C:\>which which /usr/bin/which C:\>
        and, for Cygwin:
        C:\>which which 'which' is not recognized as an internal or external command, operable program or batch file. C:\>set PATH=C:\cygwin\bin;%PATH% C:\>which which /usr/bin/which C:\>
        Cheers,
        Rob
        which which
Re: Can't find or uninstall version of perl
by clueless newbie (Curate) on May 19, 2019 at 12:49 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11100237]
Approved by Athanasius
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2022-05-22 10:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (80 votes). Check out past polls.

    Notices?