in reply to Re: Creating data structure from multiple pairs of information
in thread Creating data structure from multiple pairs of information

Why does it matter if your dog repeats?
if($dog_hash{$dog_type}){ print "dog [$dog_type] already in hash\n"; }else{ $dog_hash{$dog_type} = $food_type; }
I think that RazorbladeBidet's referral is probably the way to go if you really want to know how to hash well.

Replies are listed 'Best First'.
Re^3: Creating data structure from multiple pairs of information
by RazorbladeBidet (Friar) on Feb 17, 2005 at 19:47 UTC
    or

    push @{$dog{$dog_type}}, $food_type;

    if more than one food type is possible.
    (That is, a hash of array references)
    --------------
    It's sad that a family can be torn apart by such a such a simple thing as a pack of wild dogs