1) Good catch on the <DATA> missing changes if the HTML started containing new lines. Fixed that. While I agree that vroom might change the format, the 'displaytype=raw' is supposed to be packed HTML, with no spaces, newlines, etc. However, it is better defensive programming to add the change, than assume the 'displaytype=raw' will never change.
2) The curly braces were just localizing the $/ to the file operations. I could have just put them around the read, but I didn't see a problem one way or the other.
3) Cool trick on the fast-forwarding. I wouldn't have ever thought of that. That's not the kind of tricknology that I'm very good at. I would be concerned that someone picking up script maintainence who is not a sophisticated Perl user would really have to puzzle that out. On the other hand, it suits the purpose so nicely, I put it in.
I've made the changes and included both versions, with the new version on top, so people can see what changed.
This is the kind of code that someone who writes in 6 different languages in a single week produces (C, 80386 assembly, 8031 assembly, PHP, Perl, and Forth. I also played with Python for a few minutes). It's not as elegant as it could be, but it is functional.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||