in reply to Hash problems

Those two lines can't both be represented. $FoodHash{green}{big} can't store both a string "watermelon", and a hashref { sweet => "1234" }. Consider adding {value} to the end of all your data, so that everything is a hashref except when the key is "value". (Use some other string if "value" will conflict with your data.) So your assignments become:
$FoodHash{green}{big}{value} = "watermelon"; $FoodHash{green}{big}{sweet}{value} = "1234";

Replies are listed 'Best First'.
Re^2: Hash problems
by fizbin (Chaplain) on Aug 27, 2004 at 20:16 UTC
    Instead of value, you could always use the empty string:
    $FoodHash{green}{big}{""} = "watermelon"; $FoodHash{green}{big}{sweet}{""} = "1234";
    -- @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/