Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Extracting array of hashes from data

by srawls (Friar)
on Jun 10, 2001 at 00:50 UTC ( #87233=note: print w/ replies, xml ) Need Help??


in reply to Re: Extracting array of hashes from data
in thread Extracting array of hashes from data

push @{ $alldata{$key }, \%temphash

whoops, minor typo, big error; change the above line to this:

push @{$alldata{$key }}, \%temphash

or, you can try this:

$hash{$key} = \%temphash; # $hash{$key} is a reference to %temph +ash $hash{$hey} = \@array; # $hash{$key} is a reference to @array $hash{$key} = {KEY => 'value'}; #$hash{$key} is a reference to an anon +ymous hash $hash{$key} = [1,2,3]; #$hash[$key] is a reference to an anon +ymous array

Update:Cleaned up code formating a bit

The 15 year old, freshman programmer,
Stephen Rawls


Comment on Re: Re: Extracting array of hashes from data
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (11)
As of 2014-07-25 08:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (170 votes), past polls