in reply to Remove unwanted chars and maintain table integrity
AoA is a very good idea. You need an array for each column that could have multiple items in it. If this is only the Pro_ID column, a simple array will do the trick.
To collect the data in your while loop, just ignore the 'W':
You should be able to add the lines for count and character too.if ($array[1]!='W') { $length= $array[3] } if ($array[3]!='W') { push @id, $array[3] }
If you have read a line that belongs to a new character, just call a subroutine that prints out the previous character with all the information in $count,$length and @id in a loop. You can use perl formats or spin your own formatting.
Don't forget to call the subroutine a last time after your while loop to print the last character
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Remove unwanted chars and maintain table integrity
by Anonymous Monk on May 19, 2010 at 12:42 UTC | |
by jethro (Monsignor) on May 19, 2010 at 14:31 UTC |