Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
This is more of a thank-you note than a cool use for perl. But since I think it IS cool, here we go:

With the help of httptech, mdillon, chromatic, Corion and others (the list gets long), I managed to unpack image files in hex mode, and embed them directly into a perl script. This will allow me to build a self-sufficient script, without the need for extra image files in HTML, and make it as simple as can be to install the script on any server. All you have to do, is upload one file, chmod it, and its ready to go. When the script is called with a ?img=foo it re-packs the image and sends it back to the client. There are a few obvious downsides to this, but for small scripts, small images, I think its a pretty clever way to be user friendly.

So, without further ado, you can get the source at http://johnny.warp.psi.br/images.txt, and you can see the ouput images (all shamelessly "borrowed" from Apache) here, here, here and here!

Thanks again everyone! I had a great time learning on this one. Peers are the best teachers.

In reply to Hex Embedded Images by BBQ

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-26 04:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found