Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Extracting array of hashes from data

by srawls (Friar)
on Jun 10, 2001 at 00:50 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-23 15:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found