Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Complex Data Structure Suggestions Wanted

by cLive ;-) (Prior)
on Jun 07, 2005 at 11:17 UTC ( #464237=note: print w/replies, xml ) Need Help??


in reply to Complex Data Structure Suggestions Wanted

I haven't tested this either, but what about this:
sub ReadSource{ my $DataSource = shift; my $HashRef = shift; foreach my $ItemID (@Data) { defined $HashRef->{$ItemID} ? push @{$HashRef->{$ItemID}}, $DataSource : $HashRef->{$ItemID} = [$DataSource]; } }

cLive ;-)

edit - nevermind, I forgot about autovivifying. It's late dammit...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2020-12-04 15:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (60 votes). Check out past polls.

    Notices?