Sorry that I'm not good enough in expressing the idea in English. I do program enough in Perl and this is my testgif.pl script. Maybe this example is better.
=================================
in the html code I'm using is (ofcourse with the html-symbols around it:
img src="../cgi-bin/testgif.pl?werkplek.gif"
==================================
The Perl script is:
#!/bin/perl5.005_03 -w
use strict;
use CGI qw(:all);
my ($buffer);
if (open (INHOUD, "../docs/gemjcw/doc/sb/werkplek.gif")) {
binmode INHOUD;
print << "EOT1";
Content-Type: application/msword; filename="werkplek.gif"
EOT1
while (read(INHOUD, $buffer, 4096)) {
print $buffer;
}
close (INHOUD);
exit;
==========================
And the result is "
Thu Jan 12 14:37:10 2006 error client 82.168.213.19 malformed header from script. Bad header=GIF89a(: /www/cust/y/3/3/5/33515/cgi-bin/testgif.pl"
==================================
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.