Re: declaring a zero size hash

2006-12-12 Thread Adriano Ferreira
On 12/12/06, Helliwell, Kim <[EMAIL PROTECTED]> wrote: I think you need to do: my %loginhash = {}; That's not right. {} is a hash ref, not a hash. It stands for a scalar value. When you do that my %h = {} or, for the same result, my %h = 1; my %h = "abacate"; you end with a hash

RE: declaring a zero size hash

2006-12-12 Thread Helliwell, Kim
I think you need to do: my %loginhash = {}; Kim Helliwell LSI Logic Corporation Work: 408 433 8475 Cell: 408 832 5365 [EMAIL PROTECTED] Please Note: My email address changed to [EMAIL PROTECTED] on Oct 14. The old email address ([EMAIL PROTECTED]) will stop working after Jan 15, 2007. Please up

Re: declaring a zero size hash

2006-12-12 Thread Tom Phoenix
On 12/12/06, Dukelow, Don <[EMAIL PROTECTED]> wrote: I'm trying to declare a zero size hash so a sub function can populate it and be see by all other sub's. my %loginHash(); Maybe you mean this? my %loginHash = (); But every new variable (which is what 'my' is declaring) starts out empty

Re: declaring a zero size hash

2006-12-12 Thread Adriano Ferreira
On 12/12/06, Dukelow, Don <[EMAIL PROTECTED]> wrote: I'm trying to declare a zero size hash so a sub function can populate it and be see by all other sub's. my %loginHash(); my %loginHash; should be enough. But the "use strict" doesn't like it. It is not "use strict" that does not like i

Re: declaring a zero size hash

2006-12-12 Thread Jeff Pang
Just write it like: my %loginHash = (); This should work. -Original Message- >From: "Dukelow, Don" <[EMAIL PROTECTED]> >Sent: Dec 13, 2006 12:23 AM >To: beginners@perl.org >Subject: declaring a zero size hash > >I'm trying to declare a zero size hash so a sub function can populate it and