ARSperl Manual - ars_GetCharMenuItem

## `ars_GetCharMenuItems(ctrl,name)`

This function builds a "linked list" of menu items. It returns an array pointer to the top level menu that is made up of (name, value) pairs. If the value is, in turn, another array pointer, then it points to a submenu structure.

Illustration

          @menu_struct
           ($name = "Item1"   , $value = "This is item1")
                 .
                 .
                 .
           ($name = "Sub Menu", $value = array reference)
                                    +------> @sub_menu_struct
                                              ($name = "SubItem1", $value = ...)
                                        .
                                        .
                                        .

See Show_Menu.pl for a demonstration of using this function and its output.

On success
  A reference to an array.
On failure
  `undef`.

Example:

          $m = ars_GetCharMenuItems($ctrl, $menu_name));
          @menu_struct = @$m;

Table of Contents