use strict; use warnings; my $string = "12 word 100,000 word 20,300 word word 180"; my @array = split /\s+/, $string; # Perform your split. $_ =~ tr/,//d for @array; # Tidy up, removing commas. $array[2] /= 10; # Do some math as a test. print "$array[2]\n"; # Print the results of the # math which we just performed # on a value which had previously # been a string.