#!/usr/bin/perl -w
use strict;
open HTML, "test.html" or die "can't open html file!\n";
# read the whole file in a variable
my $htmldata=join '', ;
close HTML;
# prepare the message to display
my $parameter=shift;
my $message;
if ($parameter >0) { $message="Oh no!"}
elsif ($parameter<0) { $message="Really?"}
else {$message="Mwahahahaha!"}
# replace %MESSAGE% by whatever you want
$htmldata =~ s/\%MESSAGE%/$message/;
# display the modified html
print $htmldata