..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.
In reply to Re^4: Perl : Split/Regex
by 2teez
in thread Perl : Split/Regex
by sravs448
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |