The most obvious way would be a loop.
$i = 0; until( $F[$i] =~ m/MD:Z/ || $i > $#F ) $i += 1 } if ($i <= $#F) { print "It's field $i\n" }
In reply to Re^3: Handling variable column position
by GotToBTru
in thread Handling variable column position
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |