This is a job for a regular expression. If you are certain that you always want the first five characters after the first equal sign, you can do that.

Code

$perf =~ /=(.{5})/; $perf = $1;

Your real requirement probably is to get the first number after the equal sign. If we can assume that the number always contains a decimal point, use:

Code

$perf =~ /=(\d*\.\d+)/; $perf = $1;

You should try to write your regex to match everything that you do want, and nothing else. In most programs, you should test for a successful match before you overwrite the original string. Good Luck, Bill