in reply to Re: avoiding hash key typos
in thread avoiding hash key typos

Yep, you sure do.

Im thinking more along the lines of when a hash key is supposed to be used in more than one place in a script and it is misspelled in one or more of them.

Replies are listed 'Best First'.
Re^3: avoiding hash key typos
by davidrw (Prior) on Apr 15, 2005 at 01:07 UTC
    Note that that error is not directly because the hash key is invalid. This would produce the same error:
    my $c = undef; print "$c\n";
    Anon's sample only emits a warning because it's using the bad value for something that doesn't accept undef's... but if you were doing something like the following, you would get silent failure/undesired results:
    my $ct = $dbh->selectrow_array("SELECT ... WHERE x = ?",{},$c);