in reply to Re^2: Handling variable column positionin thread Handling variable column position
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" } [download]