in reply to Re^4: Subroutine references inside of a hash with arguments.
in thread Subroutine references inside of a hash with arguments.
Great illustration of the point! If warnings are enabled, printing an "undef" value will generate an error when the code runs. Unlike C or C++, Perl has a notion of a "not yet defined" variable and in many ways this works to HUGE advantage, like assigning a new hash key/value combo, you can just do it without needing to check whether the key exists already or not...the key will be created if it doesn't exist.