#!/usr/bin/perl
#
# Simple HTML output cleanup program.
# This remove tabs, double spaces and hard returns.
use strict;
$|=1;
my $file=$ARGV[0];
open IN,"$file";
open OUT,">$file.cleaned";
my $block="";
while(){
s/\n//g;
s/\r//g;
$block.=$_;
}
$_=$block;
while(/\t/){s/\t/ /g;}
while(/ /){s/ / /g;}
print OUT $_;
close IN;
close OUT;