Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: [OT] Perl Code Embedded in an Image

by ambrus (Abbot)
on Oct 06, 2005 at 21:31 UTC ( #498060=note: print w/replies, xml ) Need Help??


in reply to [OT] Perl Code Embedded in an Image

Without having known about your post, I wondered on the same thing a few months later.

I wanted an image that runs as a perl script without the -x switch or any other switches.

First, I've decided that this was impossible to do with a PNG image, because perl chokes right away on its header.

Then, I was looking at GIF, but I've found the specs too complicated, so I took it away.

I've however produced a BMP (windows bitmap) that doubles as a JAPH. BMP is now displayed in most browsers, however it's not allowed to upload one as a monk image (maybe because when this was decided, Netscape 4 which doesn't have BMP support, was still common back then). Thus, I can only show this image off-site: japh.bmp.

To try the perl part, download it and run with perl japh.bmp.

(The japh this one has is a trivial one, but I can change it to any perl code of course.)

Replies are listed 'Best First'.
Re^2: [OT] Perl Code Embedded in an Image
by ambrus (Abbot) on Feb 16, 2012 at 11:48 UTC

    I want to upload a copy of that file here in case you can't reach the external server. However, I don't want to just include it in code tags because that could break it (by eg. mangling newline characters).

    Thus, here's a perl script that you should run to reproduce the script: redirect its output to a file, say japh.bmp, then run the resulting file with perl like perl japh.bmp and/or view it with some image viewer program.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://498060]
help
Chatterbox?
[LanX]: there are template variables to "Auto-populate" it
[marinersk]: Yeah, someday I might become interested enough to poke around PerlMonks more internally. Most of the fancy stuff is way down on my to do list.
[LanX]: Yeah ...
[LanX]: no variable for votes_left
[marinersk]: Ah, well. I will continue to deal with it, as I have. Thanks for poking about, though.
[LanX]: you are welcome! :)
[marinersk]: LanX, your link to Darmstadt on your Home Node is broken.

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2017-05-29 14:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?