in reply to Re^2: Dynamically Calling a Subroutine
in thread Dynamically Calling a Subroutine

Remember that perl allows you to have the same name for different things: $foo, @foo, %foo, and foo() (the subroutine 'foo') are all stored in different slots of the symbol table entry for the key 'foo': $foo is in SCALAR, @foo in ARRAY, %foo in HASH, and foo() in the CODE slot. We reference all of these things at once via a "glob".

The string inside the curlies is the key we'll use to access the symbol table.

The *{...} (the glob reference syntax) is essentially saying "find the symbol table entry that contains references to all the things with this name".

The ->() following the dereference says "call what the CODE slot references in this entry." It the sub had arguments, you could put them in the parens.