You had: $stripped_html[$x] = $webcrawler( format => "text");
$webcrawler is a scalar. If it were a scalar code ref, you could do &$webcrawler( format => 'text' ), but it looks to be to be a WWW::Mechanize object. So, what you have is a scalar, then two more scalars in parenthesis.
You need some sort of operator between the '$webcrawler' and the parenthesis. More than likely, based on the parentheis, you're missing a method call:
$webcrawler->method( format => 'text' );
So, what method call takes a hash as its argument, and one of the keys is format? We look at the documentation for WWW::Mechanize, and search for the string 'format', and we find the following: $mech->content( format => "text" )
So, I can only guess that you should have written:
$stripped_html[$x] = $webcrawler->content( format => "text");
|