Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Hash of arrays

by 7stud (Deacon)
on Dec 28, 2012 at 10:01 UTC ( [id://1010680]=note: print w/replies, xml ) Need Help??


in reply to Hash of arrays

The actual data being pushed into the HOA is a lot of code and is an AD query so it wouldn't compile

And that is the setting you chose to learn how to use HOA's? Try this instead: post some code that builds an HOA from the data in a file, and then prints out all the keys and their values. Post the file and your code.

Replies are listed 'Best First'.
Re^2: Hash of arrays
by perlloz (Initiate) on Dec 28, 2012 at 10:20 UTC
    Thanks, I was using %newgrouphash = undefined; to declare my hash instead of %newgrouphash = (); That is where the extra key was coming from. forever learning - thanks for the help
      If you had
      use strict; use warnings;
      at the top of your code, it would have pointed out your problem, with the message:
      Use of uninitialized value in list assignment at ..
      (This comes from 'use warnings;')

      There is overwhelming agreement here that those two directives should be at the top of EVERY script you write, and you have just experienced an instance where it could have saved days of questioning and struggle.

                   "By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest."           -Confucius

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1010680]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-18 07:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found