Has anybody tried to write a Perl dialect that runs on a 6502 machine?

Because I'm a retro-programmer sometimes, I want a Perl dialect that could have been written in 1982. To be super-particular, a Perl dialect that runs on the X16 (https://github.com/commanderx16) or the MEGA65 (https://github.com/mega65).

TL;DR: Some of you might find this idea stupid. This post has no value for you. Thank you.

To start out, I downloaded and examined Perl 1, Perl 2, and Perl 3, just to see how the language evolved in those first few years. Granted, even Perl 1 is too powerful for 6502-based hardware. I even looked at NQP, which is also far too powerful -- but it was useful for seeing how Perl could be reduced, so to speak.

Aside from the severe constraint of fitting into a laughably minimal 16K block of ROM, it's yet a thought experiment I occasionally wonder about. Some of you might also find the idea diverting.

Even though the end product would be very weak, I still think it could be recognizably Perl.

Here's what I'm pretty sure would disappear.

The shebang (#!)

Packages(!)

Hashtables

Regexes

System, threadlike, and socket-based ops

Here's what I think would maybe still be there.

Arrays and some array ops.

Some file operations.

Sigil-based types.

Labels.

A subset of control structures (looping).

Goto.


In reply to 6502 Perl by rje

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.