in reply to A Simple hash question

use Data::Dumper; %pets = ("dog", 1, "cat", 2, "pony", 2, "dog", 2,); print Dumper(\%pets); $pets{dog}=3; print Dumper(\%pets);
gives you:
$VAR1 = { 'pony' => 2, 'cat' => 2, 'dog' => 2 }; $VAR1 = { 'pony' => 2, 'cat' => 2, 'dog' => 3 };
Data::Dumper is your friend!

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Replies are listed 'Best First'.
Re^2: A Simple hash question
by chinamox (Scribe) on Oct 01, 2006 at 15:51 UTC
    Thank you, I will read up on Data::Dumper and buy you a drink the next time I run into you in the Gentalman Looser!
      You will easily recognize me as I will be wearing my mirrorshades.

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law