boscaiolo has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to use Curses::UI to provide five menus whose contents should be read from text files. The tutorial offers this example of creating a menu:
my @menu = ( { -label => 'File', -submenu => [ { -label => 'Exit ^Q', -value => \&exit_dialog }, { -label => 'Wait ^W', -value => \&remain_dialog } ] }, }
I need to read each -label from a line of the text file and pass the name of the menu (== the filename) and the label to the subroutine called when the item is selected.
I can see that I need to manipulate some hashes but not how to do it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: trying to populate curses menus from text files
by kcott (Archbishop) on Nov 01, 2013 at 04:29 UTC | |
by boscaiolo (Initiate) on Nov 02, 2013 at 12:19 UTC | |
|
Re: trying to populate curses menus from text files (text format)
by Anonymous Monk on Nov 01, 2013 at 02:45 UTC | |
by boscaiolo (Initiate) on Nov 02, 2013 at 12:06 UTC |