http://www.perlmonks.org?node_id=233528


in reply to undef vs 0

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