#!/usr/bin/perl -w use strict; print "Content-type: text/html\r\n"; my $file="path/to/page.html"; open(fp, $file) or die "Couldn't open file: $!"; while ( my $output = ) { $output=~s/<[^>]*?>//g; $output=~s/&/&/g; $output=~s/"/"/g; $output=~s//>/g; print $output . "\n"; }; close(fp);