Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Stuck trying to append to a hash, I think

by NetWallah (Canon)
on Nov 18, 2013 at 21:54 UTC ( [id://1063206]=note: print w/replies, xml ) Need Help??


in reply to Stuck trying to append to a hash, I think

The structure you are generating is actually an arrayref-of-hashrefs.

Try this (untested):

my $items; for my $file (@file) { push @$items, { name => $file, url => \&Arbitrary_menu_2, # WHere do you get this from + ? }; }

             When in doubt, mumble; when in trouble, delegate; when in charge, ponder. -- James H. Boren

Replies are listed 'Best First'.
Re^2: Stuck trying to append to a hash, I think
by Bronston (Novice) on Nov 18, 2013 at 22:20 UTC
    Well that was simple. Thank you very much. "url => \&Arbitrary_menu_2, # WHere do you get this from" Each of these entries is a menu option, when clicked it runs the subroutine listed in the url, that truly is arbitrary as in i just made it up as it's more or less irrelevant to the code.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1063206]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-26 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found