in reply to undef vs 0
But your solution does basically the same and is not messy IMO. You could rewrite it as such:my $value=defined(getConfigValue("use_foo""))?getConfigValue("use_foo" +):1;
Which looks a bit better (and is more Perlish).my $value = getConfigValue( "use_foo"); $value=1 unless defined $value;
Please not that code provided is untested.
CU
Robartes-
|
|---|