Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: HTML stripper in WWW::Mechanize doesn't seem to work

by sk (Curate)
on Aug 01, 2005 at 03:49 UTC ( #479783=note: print w/replies, xml ) Need Help??


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).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://479783]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2018-04-27 01:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?