reaper9187 has asked for the wisdom of the Perl Monks concerning the following question:
Hi everyone,
There's a particular problem thats been bugging me for quite a while now. I have to read a text file separated by all sorts of tabs and whitespaces. I need to read the strings individually and check values.
How do i remove the whitespaces/tabs and is it possible to compare the strings/values in each line individually ??? Eg: in the sample below, i have to check if value of LOHYST is >= 3. If yes , then print it else move on to the next string. Is it possible ?? Seeking your wisdom
I've attached a section of the file below
There's a particular problem thats been bugging me for quite a while now. I have to read a text file separated by all sorts of tabs and whitespaces. I need to read the strings individually and check values.
How do i remove the whitespaces/tabs and is it possible to compare the strings/values in each line individually ??? Eg: in the sample below, i have to check if value of LOHYST is >= 3. If yes , then print it else move on to the next string. Is it possible ?? Seeking your wisdom
I've attached a section of the file below
TRHYST TROFFSETP TROFFSETN AWOFFSET BQOFFSET 2 0 5 3 HIHYST LOHYST OFFSETP OFFSETN BQOFFSETAFR 5 3 0 3 CELLR DIR CAND CS LUC083A MUTUAL BOTH NO
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Reading tab/whitespace delimited text file
by BrowserUk (Patriarch) on Oct 21, 2012 at 20:46 UTC | |
by reaper9187 (Scribe) on Oct 22, 2012 at 05:31 UTC | |
by BrowserUk (Patriarch) on Oct 22, 2012 at 06:31 UTC | |
by reaper9187 (Scribe) on Oct 22, 2012 at 06:55 UTC | |
by reaper9187 (Scribe) on Nov 01, 2012 at 12:38 UTC | |
by BrowserUk (Patriarch) on Nov 01, 2012 at 13:08 UTC | |
| |
Re: Reading tab/whitespace delimited text file
by LanX (Saint) on Oct 21, 2012 at 19:36 UTC | |
by reaper9187 (Scribe) on Oct 21, 2012 at 19:57 UTC |
Back to
Seekers of Perl Wisdom