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


in reply to check for existing value, else set to default

$a = defined $a ? $a : 'default;