Esteemed Monks, my mental resources are depleted trying to tackle this issue, I have a file of records that has the following form
Character Count Length Pro_ID Timothy Watson 12 Medulla W W W W W W ID:10 W W W ID:11 W W W ID:12 W W W ID:13 W W W ID:14 W 5 W W W W 16 W Maya Alabina 5 Exo W W W W W W ID:28 W W W ID:30 W 1 W W W W 11 W
However, I want to clean up the 'W' chars and yet keep the table intact but better aligned, considering the 'W' to be a white space I thought substituting it can allow me to reposition the non-'W' column values to the top of the column such as:
Character Count Length Pro_ID Timothy Watson 12 Medulla 5 16 ID:10 ID:11 ID:12 ID:13 ID:14 Maya Alabina 5 Exo 1 11 ID:28 ID:30
As you see, each Character has many records associated with it but they need to be aligned properly to reflect this....

I tried with Perl6::Form, Text::Tabulate then many other cpan Modules that provide matrices manipulation but they don't seem to achieve my requirement and I tried with AoAs but couldn't make it finally but back to the code where I started which doesn't produce the layout I seek:

while(my $line = <DATA>){ chomp; #print "$line######\n" ; @array = split(/E/,$line); print @array; }
Thanking you, this is going to prove a great milestone in my Perl learning journey...

In reply to Remove unwanted chars and maintain table integrity by Anonymous Monk

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.