$secretword=$words{$name}; if ($secretword eq ""){ $secretword="stupid"; } #### if (defined $secretword) { $secretword = 'stupid'; }