Hello. I wish to open a flatfile test.txt containing a single record and display this in a html table. Problem is that I only want to display certain fields and these fields, while always delimited with the same char are sometimes written on a newline. I can handle the nice one-record-per-row flatfile db's but this is a step beyond me. Any chance of a push in the right direction, it would be appreciated
Thanks!
***** BEGIN CONTENTS test.txt *******
SMQ2#TEST_2PASS TEST_671 TEST_ADV TEST_LGA TEST_ROOS#2#0
testguy#2002-07-24#13:47#testguy#2002-09-12#12:05#I295
Selective retest only
*#*
1
2 2 2 2 2 2 2 2
1# elapsedMinutes
elapsedMinutes#elapsedMinutesPass2
1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
**** RECORD EOF ***********
The fields I want to extract and display are..
Line 1
SMQ2 -> Batch Suffix ID
TEST_2PASS -> Associated Operations
Line 2
testguy -> Record Created
2002-07-24 -> Record Created Date
13:47 ->Record Created Time
testguy -> Record Last Updated
2002-09-12 -> Record Last Updated Date
12:05 -> Record Last Updated Time
I295 Selective retest only -> Record Description
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.