in reply to When is 'eval' too inefficient?

As I read your question, it looks like you're trying to add $var1 if it's defined or $var2 if it isn't, but you're getting tripped up by testing whether $var1 is true instead.

If my interpretation is correct, then test for definedness with defined:

$value += defined $var1 ? $var1 : $var2;