in reply to Re^3: HTML stripper in WWW::Mechanize doesn't seem to work
in thread HTML stripper in WWW::Mechanize doesn't seem to work

I don't think  content() returns an array. I checked the source code and this is what i see

sub content { my $self = shift; my $content = $self->{content}; return $content unless $self->is_html; ### More stuff there... ..... ..... return $content; }

Looks like it is just a scalar. Does not look like any reference to an array either so I guess it is a scalar. So he should be able to store it in one element of his array.

Replies are listed 'Best First'.
Re^5: HTML stripper in WWW::Mechanize doesn't seem to work
by Nkuvu (Priest) on Aug 01, 2005 at 04:20 UTC
    Good point. As mentioned previously, when I first replied to this I didn't have WWW::Mechanize installed and based my reply on the OP's comment. But later this evening I did install the module. And what do you know, the original script worked just fine. I did test the script with my suggestion for using an array and join, and it worked fine. Of course joining a scalar does nothing, so that obscured the success of the original script (my change worked despite the join, not because of it).