Hi everyone.
I'm fairly new to perl and programming in general, and I don't understand how to do the following. If you would be kind enough to explain it to me, I would be really grateful.
I searched around the forum but I didn't find it, so if you could point to some analogous thread it will be fine.
Basically I have a text input like the following:
<a>
word1
word2
word3
</a>
<a>
word4
word5
</a>
<a>
word6
word7
</a>
What I would like to do, is to read the file, but analyze any different <a></a> block apart from the other.
Basically, I have to perform some kind of analysis on
<a>
word1
word2
word3
</a>
and then do the very same analysis on
<a>
word4
word5
</a>
and
<a>
word6
word7
</a>
I have absolutely no clue on how to do it, I confess. So any kind of help (readings, suggestions, any other topics referring to similar problems) would be really appreciated.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
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:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.