noor78 has asked for the wisdom of the Perl Monks concerning the following question:
Can't locate HTML/TokeParser/Simple.pm in @INC (@INC contains: /etc/pe +rl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/per +l5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/ +lib/site_perl .) at rmtag.pl line 5. BEGIN failed--compilation aborted at rmtag.pl line 5.
some_file.html#!/usr/bin/perl -w use strict; use HTML::TokeParser::Simple; RemoveTags("some_file.html"); sub RemoveTags { my $html_doc=shift; my $p = HTML::TokeParser::Simple->new ($html_doc); while ( my $token = $p->get_token ) { print $token->as_is if $token->is_text; } }
Thank you.<html> <head><title>Some title</title></head> <body> <h1>Hello World</h1> How are you <p>New paragraph and stuff </body> </html>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to remove HTML tag
by moritz (Cardinal) on Mar 19, 2009 at 14:10 UTC | |
|
Re: how to remove HTML tag
by marto (Cardinal) on Mar 19, 2009 at 14:12 UTC | |
|
Re: how to remove HTML tag
by olus (Curate) on Mar 19, 2009 at 14:12 UTC | |
|
Re: how to remove HTML tag
by Anonymous Monk on Mar 19, 2009 at 15:03 UTC | |
by Nkuvu (Priest) on Mar 19, 2009 at 16:18 UTC |