while ($input) { ($field, $input) = split /delim/, $input, 2; # process $field }