in reply to Dynamic menu generation
I'm not sure in what sense you have to turn it into a "menu." In your example, you indicate it should be turned into an unordered list. That said, You would probably be better off using a hash of nested hashes instead of an array of strings to hold the "menu" data.
my %hash = ( Main => { Reviews => { 'PC' => A_LINK_OR_CALLBACK_FUNCTION, 'PS2' => A_LINK_OR_CALLBACK_FUNCTION, 'XBox' => A_LINK_OR_CALLBACK_FUNCTION, }, News => A_LINK_OR_CALLBACK_FUNCTION, }, 'Other Menu' => { Other => { Sub => { Menus => A_LINK_OR_CALLBACK_FUNCTION, }, }, }, );
Note that I use A_LINK_OR_CALLBACK_FUNCTION to represent where you would probably store a URL (if this is for a web page) or a callback function (if this is for a GUI based program.)
-sauoq "My two cents aren't worth a dime.";
|
|---|