You're setting $decide for each line you read, so it ends up telling you whether it was found in the last line; all other results were overwritten. Instead, you should set it to zero before reading, and only change it if you find the line.
Caution: Contents may have been coded under pressure.