in reply to Re^2: General pattern for interactive text-mode script?
in thread General pattern for interactive text-mode script?
An ethereal Anonymous Monk writes:
"...because I'm still not sure what it buys me over just calling the functions directly." Because you store references to the functions in the hash and can call the function indirectly by de-referencing the hash value instead of hard coding the subroutine name into a fixed control structure. Much easier, and safer, store a reference than to indirect reference via a string. It is very important for you future programing success that you learn to write and understand dispatch tables. You will encounter them in many programs and use them often in your own code.