use DBI;
use strict;
my $dbh = DBI->connect("DBI:Oracle:host=xxx.xxx.xxx.xxx;sid=xxxxx", 'x
+xxxx', 'xxxxx') or die "Connecting : $DBI::errstr\n";
$dbh->{LongReadLen} = 512 * 1024;
my $sth = $dbh->prepare("Select TITLE, HEX_PIC from pics");
$sth->execute();
(my $name, my $image) = $sth->fetchrow_array;
undef $/;
print "Content-type: image/gif\n\n";
binmode(STDOUT);
my $ImageGIF = pack("H*", $image);
print $ImageGIF;
$sth->finish;
$dbh->disconnect;
--BigJoe
Learn patience, you must. Young PerlMonk, craves Not these things. Use the source Luke. |