develooper Front page | perl.beginners | Postings from September 2009

Re: AW: Hash of Hashes

Thread Previous | Thread Next
From:
Shawn H Corey
Date:
September 29, 2009 09:09
Subject:
Re: AW: Hash of Hashes
Message ID:
4AC230D9.80909@gmail.com
Uri Guttman wrote:
>>>>>> "SD" == Soham Das <sohamdas@yahoo.co.in> writes:
> 
> 
>   SD> Lets assume, the hash of hash being a record of something which
>   SD> has already happened and hence we know the final value, not
>   SD> something which is right now happening, i.e changeable.
> 
> you keep swapping hash and array concepts, words and symbols. please
> learn to keep them separate or your perl life will be hell. hashes have
> no concept of 'final value' as an array would. maybe you mean the hash
> is finalized and won't be changed anymore. if so then say that.
> 
>   SD> In my case, its like
> 
>   SD> $Position{$Scrip}{$Date}= #some value 
> 
>   SD> That is, my position in a previous date $Date, in the stock
>   SD> $scrip, was some integer. Thanks for the correction, regarding the
>   SD> brackets. I stand corrected and it seems I have made a lot of such
>   SD> mistakes apparent in the previous two three mails.
> 
> hashes have no positions, just keys. again. try to use standard
> terminology or you won't convey any proper meaning here. programming
> requires this to be accurate. and yes, you have been making a bunch of
> hash/array mistakes and you must fix that in your head. they are similar
> in syntax styles in some ways (e.g. [] vs {}) but very different in
> semantics and terminology.
> 
> uri
> 

It would also help to post the snippet of code that is causing you 
problems.  Include some data it is to work on (not real data, you don't 
want to post real data on a public mailing list; create some typical but 
fake data) and the output you want.  There is no need to post the actual 
output; that can be generated by running the code.


-- 
Just my 0.00000002 million dollars worth,
   Shawn

Programming is as much about organization and communication
as it is about coding.

I like Perl; it's the only language where you can bless your
thingy.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About