The stupid question is the question not asked | |
PerlMonks |
Re: Using a regex as a hash keyby ikegami (Patriarch) |
on Jun 06, 2007 at 17:00 UTC ( [id://619629]=note: print w/replies, xml ) | Need Help?? |
$functions{$var1} returned undef because none of the regexp keys matched, so $functions{$var1}->($var2) gives that error. The fix is to check whether a key was found in the hash:
Perhaps it's because you never assigned a value to $var1?
In Section
Seekers of Perl Wisdom
|
|