Hi all
I am using the module HTML::TokeParser::Simple.
It currently works like i have below, where the input is a file.
How do I change it to accept a variable, multiline blob type of input?
Any help is appreciated. I do not understand how exactly the script will accept the file but not a variable input if i use a $_[0] for html_doc. Thinking i need the blob to have a @_[0] but an unable to figure out exactly how to get it. I am currently writing the file then reopening it I believe.
Code:
$remainingData = RemoveTags("$output_page");
sub RemoveTags {
my $html_doc=shift;
my $p = HTML::TokeParser::Simple->new ($html_doc);
while ( my $token = $p->get_token ) {
if( $token->is_text )
{
$temp = $token->as_is;
#do stuff here.