#!/usr/bin/perl -w use CGI::Carp qw(fatalsToBrowser); use CGI qw(:standard :cgi-lib); ReadParse(\%in); if ((defined($in{img}) && $in{img} != 1) || !defined($in{img})) { $image_file = qq~/home/user/home_dir/graphics/banners/FRHWeb_366_x_60.gif~; open(IMG,"$image_file") or die "could not read image: $!"; binmode IMG; $image_file_code = ; close(IMG); print "Content-type:image/gif\n\n"; print $image_file_code; exit; } else { $image_file = qq~/home/user/home_dir/graphics/banners/FRHWeb_212_x_60.gif~; open(IMG,"$image_file") or die "could not read image: $!"; binmode IMG; $image_file_code = ; close(IMG); print "Content-type:image/gif\n\n"; print $image_file_code; exit; }