> On Tue, Aug 23, 2011 at 10:23 AM, wrote:
> I am working on the below code to traverse through a hash, but it throws an
> error which states "Can't coerce array into hash at temp.pl line 6."
>
> Code:
> ===
> sub hash_walk {
>my
When you shift off a variable you pop it out of the argument . Just try and
get the first variable of the argument another way by copying to an array
first or something .
from perldoc
Shift :
Shifts the first value of the array off and returns it, shortening the array
by 1 and moving everything do
Thanks a lot for the suggestions and solution.
Regards,
Anand
-Original Message-
From: Shlomi Fish [mailto:shlo...@shlomifish.org]
Sent: Tuesday, August 23, 2011 5:09 PM
To: Jawaji, Anand
Cc: beginners@perl.org
Subject: Re: Hash of Hashes - Error
Hi Anand,
On Tue, 23 Aug 2011 05:57:02
Hi Anand,
On Tue, 23 Aug 2011 05:57:02 -0400
wrote:
> Hi All,
>
> I am working on the below code to traverse through a hash, but it throws an
> error which states "Can't coerce array into hash at temp.pl line 6."
>
First of all, let me note that the indentation on that code is inconsistent an
> -Original Message-
> From: anand.jaw...@emc.com [mailto:anand.jaw...@emc.com]
> Sent: Tuesday, August 23, 2011 5:57 AM
> To: beginners@perl.org
> Subject: Hash of Hashes - Error
>
> Hi All,
>
> I am working on the below code to traverse through a hash, but it
> throws an error which sta