Punish Typos!
AUTOLOAD { my @targets = grep /^[\w:]+$/, keys %::; goto &{$targets[rand @targets]}; }
Handy Perl to punish those who typo subroutine names with random, goto infested behavior. With a fuzzy string module, you could even make educated guesses at what the user wanted. Another option: profile the code, and insert interactive recommendations based on subroutine popularity!
To quiz yourself, try How's your Perl?
Technorati Tags: Perl


