Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Statistician in my garbage...

by merlyn (Sage)
on Mar 16, 2001 at 02:57 UTC ( #64828=note: print w/ replies, xml ) Need Help??


in reply to Statistician in my garbage...

You're working too hard on that HTML::Parser part:

use HTML::Parser; use HTML::Entities; HTML::Parser->new( default_h => [sub { print shift; }, "text"], start_h => [sub { local ($text, $tag,$attr) = shift; if ($tag eq "img") { $attr->{src} = Lurker::pick_random( 'IMAGES' ); $text = "<$tag"; $text .= " $_=\"" . encode_entities($attr->{$_} +). "\"" for keys %$attr; $text .= ">"; } print $text; }, "text,tag,attr"], )->parse_file($doc);

-- Randal L. Schwartz, Perl hacker


Comment on Re: Statistician in my garbage...
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://64828]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2014-10-21 22:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls