Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re:^5 Which loop should I use?

by tedrek (Pilgrim)
on Aug 01, 2003 at 16:46 UTC ( #280040=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: Which loop should I use?
in thread Which loop should I use?

The error you got was because one line got wrapped by PM, I've added a few line breaks so nothing wraps now. In your original code there was three things that jumped out at me. The first was a 'local $/;', you aren't doing anything with IO so that doesn't do anything. The second is your use of 'split "<br>",...', You are using that on the text only version which will not have any html in it so it is just assigning the text to $lines[0]. Also you split on "<br>" later which won't do anything because the original split would have gotten all of the <br>'s anyway. The third is your regex for getting $goodlines, it will only match against a string that hasn't been broken up into lines, which means your split has to fail for that regex to work. Anyway, hope you can get it to work, and if you have any questions feel free to ask.

Tedrek

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2021-09-27 23:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?