Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Dividing HTML up into chunks

by srawls (Friar)
on Jun 28, 2001 at 06:09 UTC ( #92155=note: print w/replies, xml ) Need Help??


in reply to Dividing HTML up into chunks

Note: untested code, written as I post.
open FH, "$file"; { local $/; $text = <FH>; } for($text =~ /<A NAME="([^"]+)">(.*?)(?!<A NAME=")/) { #file name is $1 #text is $2 }
Note, I saved time and used .*?. See death to dot star for why not to do that. Also, look at unrolling the loop. I leave that as an exercise to you, because I can't just hand you everything now can I : )

The 15 year old, freshman programmer,
Stephen Rawls

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://92155]
help
Chatterbox?
[shmem]: LanX: now I have to find a succinct transformation FOOL => MONK
[LanX]: yeah but Marto already proposed a new "Lex Sun-D" ...
[karlgoethebier]: the word really exists: http://www. urbandictionary. com/define.php? term=fool
[shmem]: ...possibly involving RTFM
[karlgoethebier]: big surprise!
[Eily]: LanX I try to avoid answering, but I did feel that this one post was going into much detail to prove a false claim (that SHA-1 is secure, I was just wrong about how insecure it is)
[LanX]: ironically...
[LanX]: yeah whatever ... I'm in the favorable condition to already autohiding him ... how can I judge the poor FOOLs who still see his contributions xD
[Eily]: he's been pretty saavy about threads that were implictly about him in the past. I think he might have deliberatly avoiding mentioning it for some reason (he got tired?)
[Eily]: he did mention one of his propositions: basically make it possible to ignore downvotes, by separating them more from the upvotes

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2017-07-24 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (356 votes). Check out past polls.