In article <[EMAIL PROTECTED]> wrote "Geoffrey F. Green" <[EMAIL PROTECTED]>:
> #!/usr/bin/perl -w > > my %table = ( > "key1" => > { search => "alpha", > shortname => "beta", > }, > "key2" => > { search => "gamma", > shortname => "delta", > }, > "key3" => > { search => "epsilon", > shortname => "whatever", > }, >); I'd like to give another hint: I find it dangerous, to repeat in every line search and shortname. The chance of mistyping is really big. Even if you use Copy+Paste (what's never a good solution) you get the trouble when changing later. Again, I would be too lazy - even for writing and for reading :-) Here's one possibility: my %table = map { my ($key, $search, $short) = split / /, $_; ($key => { search => $search, shortname => $shortname } ) } split /\n/, <<'TABLE'; key1 alpha beta key2 gamma delta key3 epsilon whatever TABLE That of course only goes strait when the keys don't have white spaces. And again, it only makes sense when you will use more than 3 keys a day. Greetings, Andrea -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]