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

I am working with a lot of text in an embedded system environment (i.e. we have 500K to 1 meg of "free" space) and am currently using C. However, I would love to use perl to do my dirtywork. Memory and CPU speed are not issues, JUST disk space.

How small can you get a perl interpretor, without any modules and extras? How do I get it to that point (different compilations, etc. etc. etc.).

Please help make my life oh-so-much better! Help me, oh perl monks, you are my only hope!

Replies are listed 'Best First'.
(tye)Re: how small can perl get?
by tye (Sage) on Jun 26, 2001 at 01:37 UTC

    Perl 4.036 zips into under 150KB (plus 45KB for funzip.exe) so just unzip it to a RAM disk and run from there (you said speed and memory aren't a problem). I got Perl 4.036 for DOS from CPAN.

            - tye (but my friends call me "Tye")
Re (tilly) 1: how small can perl get?
by tilly (Archbishop) on Jun 26, 2001 at 03:12 UTC
    I have never aimed Perl at an embedded environment. However this guy has a small Perl 5.6 whose RPM takes 629756 bytes. I don't know if the perl in there is signifcantly larger uncompressed.

    I have heard that for a variety of reasons (some of which will be addressed in Perl 6) Perl 5 is a poor candidate for embedding. If you want the ability to go with a high-level language in an embedded environment but don't want to lose OO support, a better bet would be Ruby or Python. For instance the Palm port of Python fits an interpreter in 173 K.

Re: how small can perl get?
by virtualsue (Vicar) on Jun 26, 2001 at 02:25 UTC