in reply to Working out frequency statistics with perl
It's better to use a regex to remove it:chop $fields[9]; # Remove the period after the last digit
Then again, this shouldn't be necessary since you are using $fields[9] as a number. For instance, the strings "3.14" and "3.14." will evaluate to the same number.$fields[9] =~ s{\.$}{}; # Remove any trailing period
|
|---|