Quoting vakeel ahmad ([EMAIL PROTECTED]):
You can do by this way
#!/usr/bin/perl
print Content-Type:image/gif\n\n;
open(FILE,filename);
@file=(FILE);
foreach $file(@file)
{
print $file;
}
close(FILE);
The unnecessary symbols in:
print $file;
are bad style, and may make
* Adam Rice [EMAIL PROTECTED] [2002-10-05 23:26]:
If I was writing this for work I would include error
checking and read and write the file in 64k blocks, but
there's no fun way to do that in Perl so I'll leave it out
here.
Yes there is.
$/ = \(65536);
See perldoc perlvar on $/
--
I am using this script to print an image using img tag
print Content-type:image/gif\n\n;
gifdata = `cat $giffile`;
print gifdata;
The problem is that it works on unix but not on windows operating sistem
Can someone give me an altenative way to print an image without extra perl
modules ?
On Mon, 30 Sep 2002, Davide Copelli wrote:
I am using this script to print an image using img tag
print Content-type:image/gif\n\n;
gifdata = `cat $giffile`;
print gifdata;
The problem is that it works on unix but not on windows operating sistem
Fun aswer: s/cat/type/
A little more
On Mon, Sep 30, 2002 at 05:05:31PM +0200, Davide Copelli wrote:
I am using this script to print an image using img tag
print Content-type:image/gif\n\n;
You should have a space between the colon and the i:
print Content-type: image/gif\n\n;
gifdata = `cat $giffile`;
print gifdata;
On 30/09/2002 16:20:25 Philippe 'BooK' Bruhat wrote:
On Mon, 30 Sep 2002, Davide Copelli wrote:
I am using this script to print an image using img tag
print Content-type:image/gif\n\n;
@gifdata = `cat $giffile`;
print @gifdata;
The problem is that it works on unix but not on windows
On Mon, 30 Sep 2002 16:27:58 +0100, [EMAIL PROTECTED] wrote:
Would it include binmode() ?
Most definitely.
--
Bart.