Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Hash & Array

by fuzzyping (Chaplain)
on Feb 24, 2004 at 20:03 UTC ( [id://331509]=note: print w/replies, xml ) Need Help??


in reply to Hash & Array

Personally, I see it as a HoHoA (Hash of Hash of Array). Use the food as the initial key, with the time being the next key, and the attendees in the array. The data could be something like this:
my %schedule = ( 'pizza' => { '10:00' => [ 'SAM', 'LUSI' ], '10:30' => [ 'MARY', 'RICK', 'DON' ], '11:00' => [ 'LARRY' ], '11:30' => [ 'ED', 'SUE' ], '12:00' => [ ], }, 'seafood' => { '10:00' => [ 'KIN' ], '10:30' => [ 'KHAN', 'MIKE' ], '11:00' => [ 'YOUND' ], '11:30' => [ 'TK' ], '12:00' => [ 'DANNY', 'MONK' ], }, );
It's a little advanced for a beginner, but the data is definitely there and accessible. HTH.

-fp

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-09-15 13:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (21 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.