On Jan 29, 2004, at 2:18 AM, Jan Eden wrote:

I am not sure if I could store all this in one hash:

I bet you can. I'm an optimist. ;)


I haven't been following this thread too closely, but let's just think about it in the general sense. What you basically has is a lot of information about specific authors, right? Can we shove an author in a hash? Sure:

my %author = (
        Name => 'Whatever',
        Indexline => 'Whatever',
        Headline => 'Whatever',
        Gedicht_lines => [ 'Poem1', 'Poem2', 'PoemN' ]
        # etc...  You get the idea.
};

Again, I haven't been following too closely, so forgive me if I don't have your format right.

From there, it's a very small leap to a global hash:

# assuming a previously defined %authors...

$authors{$author{Name}} = \%author;

Well, hopefully that'll give you some new ideas.

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to