my @fields = split /\s+/, $templine; # do something with $fields[0], $fields[4], etc ..