Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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 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
As you see, each Character has many records associated with it but they need to be aligned properly to reflect this....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
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:
Thanking you, this is going to prove a great milestone in my Perl learning journey...while(my $line = <DATA>){ chomp; #print "$line######\n" ; @array = split(/E/,$line); print @array; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Remove unwanted chars and maintain table integrity
by jethro (Monsignor) on May 19, 2010 at 10:22 UTC | |
by Anonymous Monk on May 19, 2010 at 12:42 UTC | |
by jethro (Monsignor) on May 19, 2010 at 14:31 UTC | |
|
Re: Remove unwanted chars and maintain table integrity
by wfsp (Abbot) on May 19, 2010 at 12:21 UTC | |
|
Re: Remove unwanted chars and maintain table integrity
by choroba (Cardinal) on May 19, 2010 at 10:08 UTC | |
|
Re: Remove unwanted chars and maintain table integrity
by biohisham (Priest) on May 19, 2010 at 13:47 UTC | |
|
Re: Remove unwanted chars and maintain table integrity
by doug (Pilgrim) on May 19, 2010 at 16:34 UTC | |
|
Re: Remove unwanted chars and maintain table integrity
by Marshall (Canon) on May 21, 2010 at 09:08 UTC |