#!/usr/bin/perl   
use WWW::Extractor ':all';
for $file (@ARGV) {
	print STDERR "processing $file\n";
	load_html $file;
	open OUT, ">$file.out" or die "can't write output file";
	$output = document->as_string;
	for (split /\n/, $output) {
		next if /^\s*$/;
		print OUT "$_\n";
	}
	close OUT;
}
