RE: adding hash reference into hash

2003-03-03 Thread Hanson, Rob
Your syntax is a little off... $intHash1Ref = {}; $intHash2Ref = {}; # note use of parens, not curly braces %containerHash = (hash1 = $intHash1Ref, hash2 = $intHash2Ref); The parens store a list into %containerHash, the curly-braces were storing a hash-ref. Rob -Original Message-

Re: adding hash reference into hash

2003-03-03 Thread Robin Norwood
Yannick Warnier [EMAIL PROTECTED] writes: Hi, I'm just trying to make a structure with a hash containing some references to other (yet unused) hashes. So what I wrote this: $intHash1Ref = {}; $intHash2Ref = {}; %containerHash = { hash1 = $intHash1Ref, hash2 = $intHash2Ref};

RE: adding hash reference into hash

2003-03-03 Thread Shishir K. Singh
,, $hashRef-{$hashKeys},\n; } } Output is C D A B -Original Message- From: Hanson, Rob [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 12:14 PM To: 'Yannick Warnier'; [EMAIL PROTECTED] Subject: RE: adding hash reference into hash Your syntax is a little off

RE: adding hash reference into hash

2003-03-03 Thread Shishir K. Singh
$hashKeys,, $hashRef-{$hashKeys},\n; } } -Original Message- From: Shishir K. Singh Sent: Monday, March 03, 2003 12:42 PM To: 'Hanson, Rob'; 'Yannick Warnier'; [EMAIL PROTECTED] Subject: RE: adding hash reference into hash You may want to handle them as $intHash1Ref

Re: adding hash reference into hash

2003-03-03 Thread Dave K
Yannick, $ perl -e ' %ch = (h1 = {}, h2 = {}); for (keys %ch) { print$_\n; }' h1 h2 Hi, Hello, I'm just trying to make a structure with a hash containing some references to other (yet unused) hashes. see above. So what I wrote this: $intHash1Ref = {}; $intHash2Ref = {};