in reply to adding to a hash

powerhouse,
When you the % sigil for a hash (%hash =), you are saying:

Assign the entire hash to

To assign an individual key/value pair try:

$hash{'key1'} = 4; $hash{'key2'} = 5;
You will notice that the % sigil has change to a $. Remember that $ looks like the s in scalar. It means just a single piece of data. When you get a little more advanced, you can check out hash slices.

There are plenty of resources for learning Perl:

  • http://learn.perl.org/ which even has free on-line books
  • Perl FAQ for frequently asked questions
  • Perlmonks Q&A
  • Learning Perl - (dead tree) O'Reilly

    Cheers and keep trying

    L~R