cscu2007 has asked for the wisdom of the Perl Monks concerning the following question:
-------------------------------------------------------------------------------------------
Name Company Work Home Work
Name Address Phone Hours
Number
-------------------------------------------------------------------------------------------
John ABC MAIN_STREET 987.111.4567 8
Bob CNN 2nd_Street 875.444.3425 2
I can build a hash table for the contents, but trouble is with the header. I need to find out how to get the column number based on above header, to extract the corresponding values per column. The reason to do this, because the header is dynamic, including orders, but for the same column, the header is always formated as aligned (first letter across multiple rows, as above).
For example, I need to find out which column of "Work Address" from header, then I can grep the corresponding column from the table contents.
Thanks in advance for the help!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: finding colunm header which crossing multiple rows
by tybalt89 (Monsignor) on Nov 16, 2018 at 20:07 UTC | |
by ikegami (Patriarch) on Nov 16, 2018 at 21:12 UTC | |
by cscu2007 (Novice) on Nov 16, 2018 at 21:21 UTC | |
by cscu2007 (Novice) on Nov 16, 2018 at 21:18 UTC | |
|
Re: finding colunm header which crossing multiple rows
by LanX (Saint) on Nov 16, 2018 at 19:54 UTC | |
by cscu2007 (Novice) on Nov 16, 2018 at 21:24 UTC | |
|
Re: finding colunm header which crossing multiple rows
by BillKSmith (Monsignor) on Nov 17, 2018 at 16:49 UTC | |
by kcott (Archbishop) on Nov 17, 2018 at 21:53 UTC |