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

open(FIND, "find . -type f -print | xargs grep -l '^=head1' | ")
    or die $!;

while (<FIND>) {
    chomp;
    if (-M($_) < -M("$_.html")) {   # source younger?
	print("pod2html < $_ > $_.html\n");
	system("pod2html < $_ > $_.html");
	die if $?;
    }
} 
