in reply to regex question

My suggestion is to split at the whitespace, and take or modify those parts you need. Afterwards you can join them again.

For example:

my @fields = split m/ /, $line; $fields[9] = 50; print join ' ', @fields;