Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by sk (Curate)
on Aug 01, 2005 at 03:49 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://479783]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-03-28 20:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found