in reply to Re^2: On Challenging Ways to Learn Perl
in thread On Challenging Ways to Learn Perl

A PNG can't work, because it starts with a header that raises a syntax error in perl (unless you use some command-line switches). A GIF may, but I was lazy to do that. I don't know about JPEG, TIFF, or other image formats.

  • Comment on Re^3: On Challenging Ways to Learn Perl

Replies are listed 'Best First'.
Re^4: On Challenging Ways to Learn Perl
by mobiusinversion (Beadle) on Mar 28, 2008 at 19:53 UTC
    The following headers are from filext. I believe the are all in little endian hex...
    TIFF : 49 49 2A 00 JPEG : FF D8 FF MIFF : 69 64 3D 49 6D 61 67 65 4D 61 67 69 63 6B MNG : 8A 4D 4E 47 0D 0A 1A 0A 00 00 00 1C 4D 48 44 52 RAW : 6D 68 77 61 6E 68 00 04 SVG : 3C DJVU : 41 54 26 54 46 4F 52 4D 00 ICO : 00 00 01 00 PBM : 50 34 0A PSD : 38 42 50 53 00 01 00 00 00 00 00 00 00
    Your thoughts?