I have a text file that contains data that is pipe delimited. Below is an example:
4874|Kent Bottenfield|4|2|3.94|16.0|15|7|7|3|13|1| 5868|Nelson Cruz|7|0|4.00|9.0|10|5|4|1|5|0|0|0|0|0|2| 6111|Octavio Dotel|2|2|4.91|11.0|12|7|6|7|9|1|1|0|0| 6030|Scott Elarton|4|4|5.09|23.0|21|13|13|6|21|3|1|0| 6534|Wayne Franklin|7|0|6.43|7.0|11|5|5|3|4|0|0|1|0|0|
Right now I am able to parse all of the data out of the text file. Then have it outputted to an HTML format. I want to be able to take the second column and put it in this format ex. K. Bottenfield, instead of taking the full name. Right now I can only take the full name. I want to be able to just take the first letter in the first name and put a period after it, then take the last name. Any suggestions?

In reply to Splitting Data Out of a Text File by Perl Newby

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.