Help will be more forthcoming if you demonstrate that you've made some attempts to solve your own problem. See
On asking for help and
How do I post a question effectively?.
"Kindly someone help me with the code"
Merely providing a spec and asking the Monks to do the work doesn't constitute an "attempt." Instead, post your code, any error message it produces (verbatim), and a description of how the output (if any) fails to satisfy your spec.
Hence, no code...
...but, in line with the Monastery's mission, here are some thoughts to help you along your way:
- If your data source is, indeed, as regular and consistent as your example, identify the distinctive features of a block that should go into one row of your proposed table that start and end a block that doesn't also occur within your "blah blah" -- (and you'll have to take a look at your whole file, to make sure that /\d{8}$/ (for more info, see the next bullet... but this one means 'match any collection of 8 decimal digits that occurs at end end of a line)
- Read perlretut or the Regex section of the tutorials, here.
- Code an appropriate regex (set of regexen) as a snippet
- Read open or the alts suggested there to start learning how to read a file; insert your take on that into your snippet, above the regexen
- Seek out (hint: google using "site:perlmonks.org search terms" or Super Search the way to read the opened file into variables (in RAM)
...and about the appropriate kinds of variables for your task
- Familiarize yourself with CPAN's family of HTML::... modules
- ...
- ...
- succeed || post your work here, using the guidance in the para below the quoted snippet from your initial question
If you get stuck along the way, we'll be here to help with the specific problem!
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.