#!/usr/bin/perl
print "Content-type: text/html\n\n";
$from=$ENV{'HTTP_REFERER'};
if ($from eq "")
{$from="http://www.caregivercompanion.com";}
open TEMPLATE, "sendthis.html" or die "unable to open sendthis.html";
@template=;
close TEMPLATE;
foreach (@template)
{
$sht=$_;
if ($sht=~m/12345/)
{
print <$from
EOM
;
}
print $_;
} #end of for each