- or download this
my %aMenu = { label => " A", MenuItems => [ @MenuItems ] };
- or download this
my %aMenu = ( label => " A", MenuItems => [ @MenuItems ] );
- or download this
# if @MenuItems actually has something it it, then MenuItems => [@M
+enuItems] is fine
# but for simplicity i just made it MenuItems => []
...
foreach my $app (map {lc $_} @sorted_applications) {
push @{ $menus{$app}->{MenuItems} }, $app;
}
- or download this
my %menus;
foreach my $app (map {lc $_} @sorted_applications) {
$menus{$app} ||= { label => " ".uc($app), MenuItems => [] };
push @{ $menus{$app}->{MenuItems} }, $app;
}