in reply to Re^2: Best Multidimensional Hash Practices?
in thread Best Multidimensional Hash Practices?

If you do not want the autovivification to happen with exists, try no autovivification 'exists';

You can even restrict its effects within a lexical scope!

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^4: Best Multidimensional Hash Practices?
by almut (Canon) on Oct 12, 2009 at 21:18 UTC

    IMHO, this should eventually become a core module/pragma...

      Perl 6 goes as far as allowing autvivification only on writing accesses, so %hash<k1><k2><k3> shouldn't autovivify anything, but %hash<k1><k2><k3> = 1; should.