in reply to Jumping in over my head again

You could try something based on the following. Put the special character in $delim and start $buf from the next character. You'll have to modify this depending on whather the 'IEA' and delimiter are to be part of the count. Of course, you'll want to put this in a loop with the read and $delim finding code.
$start = index $buf, 'IEA'; $end = index $buf, $delim, $start; $length = $end - $start;
HTH, traveler