Overall, it looks like you're writing pretty sensibly. Just a couple of minor things I noticed:

These assignments:

@text = "g total";
should really have the right side in parentheses, IMO. It just makes me cringe to have mismatched assignments.
$ntext = (split (/;/)) [0]; $ntext =~ s/n01//g;
Do you really want a global replacement? It would be clearer to do this as one extraction:
($ntext) = /^n01([^;]+)/; # or /^n01(.+?);/;
You've got useless (though not harmful) quoting here:
print OUT "$_";
and it could be written as just:
print OUT;
And since it's part of every branch of your if, you might as well just move it outside the whole conditional and get rid of the else clause.

About your plans for future development. Instead of reading all the lines into an array, I would recommend you stop keeping track of @gcard and @pcard, since they never really change. They're entirely dependent on corresponding elements in @text. So just accumulate @text as usual (without any truncation, and put all your column-width processing into the printing section after the while loop. Calculate the sum of the lengths of text, determine how wide each column can be, and then format all your output accordingly.


The PerlMonk tr/// Advocate

In reply to Re: Feedback request for text file manipulator by Roy Johnson
in thread Feedback request for text file manipulator by NovMonk

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.