in reply to Re^2: beginner question - why is hash key unquoted and in capitals
in thread beginner question - why is hash key unquoted and in capitals

$sub{$dir}{CALLBACK} is short hand for $sub{$dir}->{CALLBACK}, and they are literally equivalent. Any time an array or a hash contain array or hash references, you can use that notation. This is discussed in Arrow Rule in perlreftut.

The value held in $sub{$dir} is being dereferenced as a hash, and then the value stored with key CALLBACK is being set to $callback. I find halfcountplus's statement on this misleading at best.

Replies are listed 'Best First'.
Re^4: beginner question - why is hash key unquoted and in capitals
by Anonymous Monk on Oct 16, 2010 at 16:35 UTC
    Hi, thanks for answering. That is what I thought but the other comment confused me (and a beginner is easily confused!)