You have a couple of typos - have a look at Use strict and warnings
my @files = glob "$calls_dir/*.hmtl"; # should be $call_dir and 'html'
I don't think this does what you think
$tidy->parse( $file, $contents_of_file )From the docs :
parse( $filename, $str [, $str...] ) Parses a string, or list of strings, that make up a single HTML file. The $filename parm is only used as an identifier for your use. The file is not actually read and opened.
Try instead
pojopen my $in_fh, '<', $file or die "Could not open $file : $!"; my $contents_of_file = do { local $/;<$in_fh> }; close $in_fh; $tidy->parse( $file, $contents_of_file ) or warn "Error parsing $file :$!";
In reply to Re^3: Perl HTML::Tidy
by poj
in thread Perl HTML::Tidy
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |