#!/usr/bin/perl --
#
use warnings;
use strict;

open my $adsense, "<adsense.html" or die $!;
my $ad = '';
{
local $/ = undef;
$ad = <$adsense>;
}
close $adsense;

while (<STDIN>)
{
	if ($_ =~ /(<body.*?>)/) {
		my $tmp = $1;
		$_ =~ s/$tmp/$tmp\n<div>\n$ad\n<\/div>/;
	}
	print $_;
}
