#!/usr/bin/perl

use File::Find;

find sub
{
    return if !($_ =~ /.*html$/);
    print $_;
    rename ($_, $_ . '~');
    open (OUT, ">$_");
    open (IN, $_ . '~');
    while ($line = <IN>)
    {
	$line =~ s(<head>)(<head>\n<meta http-equiv="Content-type" content="text/html;charset=iso-8859-2">);
	$line =~ s(<HEAD>)(<HEAD>\n<meta http-equiv="Content-type" content="text/html;charset=iso-8859-2">);
        print OUT $line;
    }
    close (IN);
    close (OUT);
    unlink($_ . '~');
    print "\n";
}, ".";

