---------- Jason wrote : ---------- I'd be interested to see if you could generalise it across more than just the <body> tag - maybe storing tags in anonymous arrays in a hash that uses the tag name as the key - something like that. ----------
Yes, that's what I have in mind. The code is probably already capable of matching most tags. I'll investigate and see how it goes. Once you can store a tag in a tidy form in variable, you can then do anything with it. This leaves an open door for many possibilities for parsing , cleaning up or condensing code. ---------- Mohammed wrote: ---------- Furthermore, for those who don't use modules and code it all themselves, how many can honestly say that their work is more stable and reliable than the corresponding module on CPAN? Honestly. ---------- Mohammed, I don't claim that my code is more stable than HTML::Parse and never have. I sent the 2 pictures just to say that your claim that the new wheel is rarely better than the old one was false (and I do know you didn't mean that literally), and though you didn't agree, I'm not going to get into this debate because as far as I'm concerned any wheel can be made more solid, more adhering to the ground, more long-lasting, etc. My original intent was not to make a better code that contained in the HTML::Parse module, but to match a body tag. Originally, I only matched the new line characters, but with Jason's, Mark's and Jenda's help I took it much further. And with Jason's encouragement, I'm planning on taking it further still. On a side note, I am glad that the topic of discussion shifted from "this is not possible to do reliably" to "OK, this is possible, but why waste time?" (actually, I didn't waste time, this was not related to any project). ---------- Jenda wrote: ---------- (1) While I am too lazy to try and find something that'd break your code I bet I could find it. ---------- (2) If you take this as a learning experience, then it was not wasted time otherwise ... ---------- (1) Come on, Jenda! I could not have been more open in this discussion. I sent every update of my code for everyone to critique and try to break. And once it gets more or less reliable, all you find to say is that you could break it if you wanted to but you are too lazy? I know you are a busy person, but does that justify a claim like that? Reading it between the lines tells me "you can work on it as hard is you can, but you'll never make it good enough anyway, so I won't even bother looking through it". Please. (2) Actually, it was a learning experience, and hopefully not only for me. Perl is my programming language of preference, but I'm doing a project in ASP at the moment. This was thus an opportunity to get back to Perl in my spare time. On the last note, thanks to everyone who participated in this discussion. I am more than willing to receive and analyse other cases when the code breaks if someone finds any. As I've said above, I'm going to try and take it further and see if I can match all HTML tags or not, then add some useful functionality if that is the case. P.S. It'd be interesting to hear if the thread starter actually decided to use this code, use the module or give up the task all together ;). -- __________________________________________________________ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup One click access to the Top Search Engines http://www.exactsearchbar.com/mailcom _______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs