![]() |
|
Just another Perl shrine | |
PerlMonks |
Re: Loop behavior with HTML::TokeParser::Simpleby WhiteBird (Hermit) |
on Dec 20, 2003 at 22:50 UTC ( #316106=note: print w/replies, xml ) | Need Help?? |
Roger, you are correct about the structure of the code, and that the print statement has to be in the proper place in the loop. I am now saving 99% of what I need into a new file. I have quite a few loops as I sweep through the HTML to get my file name, and now everything I want gets printed into my file except the bit of text that I pull out to use as a file name for the image. The relevant code is this:
In keeping with wishes, and genies, and not trying people's patience, I ask my third and last question on this code...Is there a way to put a token back into the stream so that I can keep the file's title text? UPDATE:Taking a step or two back from this I realized a simple answer to my own question. I just added a print FILE $title; statement in after the regex and it did what I needed. I was so wrapped up in parsing the HTML that I had lost the thought that I could use another approach. Thanks, Monks, as always for your assistance.
In Section
Seekers of Perl Wisdom
|
|