|Pathologically Eclectic Rubbish Lister|
Helper script to format code and output to perlmonks markupby LanX (Cardinal)
|on Apr 04, 2021 at 21:03 UTC||Need Help??|
It's really tedious to need to correct code and example output after spotting a flaw.
That's why I just hacked PM.pl to automatically wrap code-tags around my combined source-file and output, so I just need one copy and paste.
Just put it into the same directory like your other scripts.
Activate it just with do "./PM.pl" inside your source file.
It requires a __DATA__ at the end of your source code and will warn you otherwise
NB: The do PM.pl; is omitted as is __DATA__ if it's the last line.
which renders as
The code is pretty self explanatory, you can adjust it to your needs
UPDATE: fixed localization of non-buffering