http://qs321.pair.com?node_id=53040

Pug has asked for the wisdom of the Perl Monks concerning the following question: (subroutines)

I'm using IniConf which returns undefined if the section does not exist. I have found that this works but it is painful to read:
if ( ! my $temp = $cfg->val("MISC","HASHTYPE") ) { $CONFIG{HASHTYPE}="sha1"; } else { $CONFIG{HASHTYPE}=$temp; }
Is there a better way?

Originally posted as a Categorized Question.