# Generate this by doing what you do now to make your menus. # Then save it to a file by using Storable's lock_store function: # use Storable qw( lock_store ); # # lock_store( \%menu_data, 'menu_file.store' ); # In the code you use to render your html menu, load the data from # the file using Storable's lock_retrieve function; # use Storable qw( lock_retrieve ); # # my $menu_data = lock_retrieve( 'menu_file.store' ); # Here is an example of a data structure that compactly represents your # menu. # # Item format [ 'Text', Link, children ] my $menu_data = [ [ 'About', undef, [ ['About me', 'About/About_me.pl'], ['About my user names', 'About/About_my_usernames.pl'], ['About this site', 'About/About_this_site.pl'], # And so forth ], ], [ 'Books', undef, [ ['Fiction', 'Books/Fiction.pl'], ['Non-fiction', 'Books/Non-fiction.pl'], ['Role-playing fiction', 'Books/Role-playing_fiction.pl'], # And so forth ], ], [ 'Fiction', undef, [ ['My Life as a Witch', 'Fiction/My_Life_as_a_Witch.pl'], # And so forth [ 'Erotic fiction', undef, [ [ 'The Angel', 'Fiction/Erotic_fiction/The_Angel.pl' ], [ 'The Assassin', 'Fiction/Erotic_fiction/The_Assassin.pl' ], # And so forth ], ], ], ] ];