in reply to Perl on Windows 10

Hello kcott,

You had already a lot of good suggestions, among them MSYS2 which is new to me and I want to explore too, so I just add a few considerations.

Strawberry Perl is an optimal choice: I'm happy with this since many years. I always opt for the portable edition which comes with portableshell.bat launcher that simply launch an appropriate ENV without messing with the system.

Obviously Windows has no a System Perl, but anyway using berrybrew can be useful to have different distro installed: personally I use a homegrown solution, still to be published, but the only important thing is (in case you need custom launchers) is to always prepend strawberry paths to everything: c:\strawberryXX\perl\site\bin; c:\strawberryXX\perl\bin; c:\strawberryXX\c\bin; ....

Personally, in my custom application, I use UnxUtils to have a bounch of friendly commands available in the prompt. Also gnuwin32 proved to be useful and robust. Dunno what you really intend with command line interpreter.

About git I use git CMD but I'm used to have a separate window for this.

CAVEAT as you left windows OSs at XP era you might be interested in new traps included in newer OSs. Mostly FileSystem Redirection. See this article, this post of mine this other one about registry Redirection and this one too. All this posts and others are available in my bibliotheca dedicated section.

In summation: if something is 32 bit you will be redirected, as you can see:

perl -v This is perl 5, version 28, subversion 0 (v5.28.0) built for MSWin32-x +86-multi-thread-64int perl -e "opendir my $dir,'c:/windows/system32'; my $files; while (my $ +ele= readdir($dir)){$files++ } print qq(found $files elements in syst +em32\n)" found 3001 elements in system32 perl -v This is perl 5, version 26, subversion 0 (v5.26.0) built for MSWin32-x +64-multi-thread perl -e "opendir my $dir,'c:/windows/system32'; my $files; while (my $ +ele= readdir($dir)){$files++ } print qq(found $files elements in syst +em32\n)" found 4576 elements in system32

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: Perl on Windows 10
by kcott (Archbishop) on Jun 24, 2019 at 07:19 UTC

    G'day Discipulus,

    Yes, I think I'm pretty much sold on Strawberry Perl.

    For the command line interpreter I'm looking for an xterm (or equivalent) running bash with all the usual cd, ls, grep, ln, etc. commands. I use utilities like tar, vim, make, ssh, git, and so on. I'd want to run my own Perl programs and Bash scripts; and, from time to time, code I've written in other languages. All of those are just non-exhaustive examples. Overall, I'd say nothing particularly out of the ordinary.

    Thanks for the links on "FileSystem Redirection" which I've followed. I also had a brief look at your "bibliotheca" — only followed a few of those links.

    — Ken

      If you install git (standard download from git-scm.com), you get "git-bash" (an MSYS based GNU bash), and a perl is included (which could be seen as a "system perl"). Calling the portableshell.bat of a portable Strawberry from git-bash seems to work in principle (perl -v gives the Strawberry's version instead of git-bash's), but seems to mess with keyboard settings (arrow-up and down move the cursor/send control characters instead of browsing through the CLI history). I assume one could convert the BAT file into a shell script, which would mitigate this.

        I seem to recall using git-bash (or something with a very similar name) on a company MSWin machine a year or two ago.

        As I use 'set -o vi', I don't have a problem with arrow keys. I do, however, remember some minor annoyance such as this — not sure what it was though.

        I'll keep this in mind as another possible option. Thanks.

        — Ken