On 2/15/06, anand kumar <[EMAIL PROTECTED]> wrote: > can anyone help me on how to store the data with hash key as the 'Name' > and the hash strings as the details of 'AGE' and 'Book'
Perl's hashes use a single key to look up a single value. So, to keep this simple, you can use two hashes, %age and %book, but the same set of keys (the names) for both. Once you've determined the values that go with a given name, you can store them into the hashes with code like this: $age{$the_name} = $the_age; $book{$the_name} = $the_book; Are you also working on the problem of how to determine which ages and books go with which names, when the data is in the form you've given? Please say so if you are. Is this enough help that you can write some code? Let us know if you get stuck again, and please include some source code so we can see how far you've gotten. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>