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...


In reply to Re: Complex Data Structure Suggestions Wanted by cLive ;-)
in thread Complex Data Structure Suggestions Wanted by Ninthwave

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":