>>>>> "DB" == Dan Boger <[EMAIL PROTECTED]> writes:

  DB> aren't you auto-vivifying the hash keys, are you're looking them up?  by
  DB> checking the value of $apples{crabapple}{weight} you are automatically
  DB> creating those keys.  perhaps 'exists' would avoid that?  or you could
  DB> check the existance of $apples{rabapple} before checking any subkeys on
  DB> it.

exists will autovivify. this is a known feature/bug (depending on your
view). exists doesn't control the higher level access to a hash element,
it only checks the existance at a single level. so all higher level
elements will be autovivified as needed. see my article for code that
does an exists without autovivifying.

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org
Damian Conway Perl Classes - January 2003 -- http://www.stemsystems.com/class
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to