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

I am looking for a simple interpreter that comes in a single file, and needs no installation. By simple I mean an interpreter that supports at least "<STDIN>. print, if, for, while, arrays, files and sub-routine" operations. Such a tool would be great utility for those who would like to learn programming on their own, without the hassle of installation and configuration. Is there a minimal version of Perl already available? If there isn't, I guess that the wisdom of the Perl Monks can conjure it up one in no time.

Replies are listed 'Best First'.
Re: perl.exe in a single file for Windows
by stevieb (Canon) on May 08, 2019 at 00:54 UTC

    Strawberry Perl offers a no-install, Portable Edition. You can investigate the various offerings, here.

    If you want a quick and easy way to fetch and maintain multiple portable editions simultaneously, you can use berrybrew. Technically, it doesn't get "installed" either, nor do the perl instances you fetch and maintain using it.

    -stevieb

      Stevieb, Thanks for pointing out the no-install portable version of Strawberry Perl for Windows. What I am actually looking for is a tiny, minimal Perl interpreter, in a single file, suited for one to learn the basics of a programming language. Something with the kind of functionality of the early versions of BASIC, and taking about a few hundred KB would do fine. The portable version of Strawberry Perl at 148 MB seems to be a well-endowed version of Perl, more suited to meet higher level demands. - Anonymous Monk
Re: perl.exe in a single file for Windows
by salva (Canon) on May 08, 2019 at 08:49 UTC
    perl without any module is going to be pretty dull, not very beginner friendly...

    You can use PAR::Packer to pack into a single executable the perl binary plus a minimal set of modules and a loader script which would load the user program, maybe creating a newbie friendly environment (for instance, forcing strictures and warnings).

Re: perl.exe in a single file for Windows
by bliako (Abbot) on May 08, 2019 at 08:33 UTC

    Would you like to build your own (static=all dependencies packed in) perl? Mine (5.28) is 12Mb thick. Theoretically it is stand alone.

    Alternatively, there are docker images at https://hub.docker.com/_/perl. And of course webperl.

Re: perl.exe in a single file for Windows (webperl)
by LanX (Saint) on May 08, 2019 at 11:47 UTC
    > utility for those who would like to learn programming on their own, without the hassle of installation and configuration.

    Maybe Run Perl 5 in the Browser! is an alternative ?

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

Re: perl.exe in a single file for Windows
by Anonymous Monk on May 08, 2019 at 11:37 UTC
    A really small perl.exe with only dependency on libperl${version}.dll (or even statically linked, why not) can be compiled by following perlembed.
A reply falls below the community's threshold of quality. You may see it by logging in.