in reply to undef vs 0

Yet another solution:
my ($value) = grep defined, getConfigValue( "use_foo" ), 1;