D
Dan Jacobson
This solution posted two months ago was supposed to strip all the HTML
tags given on the command line, but it turns out it strips all the
tags whatsoever. Help.
#!/usr/bin/perl -w
# striptag -- strip given tags out of HTML
#Usage example: striptag font div < file.html
use strict;
use HTML:arser;
my $parser = HTML:arser->new( text_h => [ sub { print shift; },"dtext" ]);
$parser->parse_file(*STDIN);
tags given on the command line, but it turns out it strips all the
tags whatsoever. Help.
#!/usr/bin/perl -w
# striptag -- strip given tags out of HTML
#Usage example: striptag font div < file.html
use strict;
use HTML:arser;
my $parser = HTML:arser->new( text_h => [ sub { print shift; },"dtext" ]);
$parser->parse_file(*STDIN);