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

Re: Extracting a substring from HTML

by mugwumpjism (Hermit)
on Sep 11, 2006 at 04:13 UTC ( [id://572269]=note: print w/replies, xml ) Need Help??


in reply to Extracting a substring from HTML

Check out XML::LibXML for the nice ways to do this, using standards such as XPath and DOM. Regular expressions are not a very good way to parse structured input like XML, unless you can limit the input to a known subset of XML forms.

$h=$ENV{HOME};my@q=split/\n\n/,`cat $h/.quotes`;$s="$h/." ."signature";$t=`cat $s`;print$t,"\n",$q[rand($#q)],"\n";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-04-25 22:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found