in reply to Undefined Hash Values and Ternary Operators
my $undef_var = undef; my %hash; @hash{foo, bar, baz} = (1, $undef_var, 2); for (sort keys %hash) { printf "%s => %s\n", $_, defined $hash{$_} ? $hash{$_} : 'unde +f'; } [download]