Found a typo bug in an old script, but I don't understand how this line passes a perl -cw:
$ perl -w -e 'my $t = "t"; this{$t} '
Can't locate object method "this" via package "t" (perhaps you forgot to load "t"?) at -e line 1.
$ perl -w -e 'my $t; this{$t} '
Can't call method "this" on an undefined value at -e line 1.
The bug is the missing $ sigil for a hash %this But why does perl think I'm trying reference an object here?