in reply to How to substitute 0 (zero) Instead of 'n/a'

Use an "if digit" statement, like this:

$impressions += $value if ( $value =~ /\d+/ );

where you have #$impressions += $value;

Of course, you might also want to put in the semi-colon on the print line above it, or just add the newline character to the previous print statement... :)