in reply to Re^2: How to call a sub reff from a hash
in thread How to call a sub ref from a hash

Because you have no scalar $Procedures declared (you have a hash %Procedures, but that's something completely different).

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^4: How to call a sub reff from a hash
by NateTut (Deacon) on Dec 15, 2008 at 22:12 UTC
    Yes, but I'm trying to access an element of that hash.

      Your wrong code:

      $Procedures->{$Procedure}($Parameter); ^^^^^^^^^^^ Not a hash. Undeclared and uninitialized scalar.

      The correct code:

      $Procedures{$Procedure}->($Parameter); ^^^^^^^^^^^^^^^^^^^^^^^ Element of a hash
      A reply falls below the community's threshold of quality. You may see it by logging in.

      Then you want to re-read perldata and perlreftut because $foo->{'bar'} has nothing to do with trying to get at $foo{'bar'}.

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.

        Originally I had: &$Procedures{$Procedure}($Parameter); but that gives me the same error.