in reply to Re^3: Perl : Split/Regex
in thread Perl : Split/Regex
..That works, but what if you just so happen to have a "Y" in the third field?..
For the lines without the Y there would be no *fourth field counting from 0, check or count it.
And even if you decide to include Y in the those lines last field if($fields[-1] eq 'Y'){.. would still work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Perl : Split/Regex
by AppleFritter (Vicar) on Sep 03, 2014 at 23:29 UTC | |
by 2teez (Vicar) on Sep 03, 2014 at 23:39 UTC |