Thank you to everyone for your information/guidance. I was able to get the data successfully put into a hash and got the Text::Table output to work also. Now if i can complicate it a bit more, within the same column after the nickname there is a list of disks associated with each host and there could be multiples for each one (i updated input file below to show example). Sorry i didn't put this in originally but i'm taking baby steps. Is it possible to do this in one hash? should i put the disk info into an array somehow and create a reference to that array in the hash table or should i try and split this into two hashs and possbily join them by unique key?. Thanks again.

I'm looking to parse a single column text file and split repeating data in that file into record/table format for output. Below is a sample of the input file and what I'd like to see for the output. I'm not looking for sample code just some direction to which perldoc i should be reading to get me started. Thank you.

<input file>
portID=0
portName=1A
domainID=0
hostMode=Standard
nickname=host1
disk=00:81
disk=00:79
disk=01:34
portID=0
portName=1A
domainID=1
hostMode=AIX
nickname=host2
portID=0
portName=1A
domainID=10
hostMode=HP
nickname=host3


<output>
PortID PortName DomainID HostMode Nickname
0 1A 0 Standard host1
0 1A 1 AIX host2
0 1A 10 HP host3



In reply to Text File Parsing by dr014578

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.