in reply to pg 246 of programming perl

Change it into,

$a1 = $hashrefA->{'Adam'};

Now you will be getting the correct output.

Prasad

Replies are listed 'Best First'.
Re^2: pg 246 of programming perl
by jbrugger (Parson) on Jun 28, 2005 at 05:45 UTC
    Correct!,
    Since you want to 'learn references', what prasadbabu did, was dereferencing, so $a1 actually holds it's own copy of the value derederendec from the hash.

    "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.