use strict; my $bar = 'bar'; $foo{$bar} = 1; $foo{$bor} = 1; # typo, won't compile