in reply to Obscure ${foo} reference

the $fh variable is a glob reference... something like *Symbol::GEN0.

${*$fh} dereferences the glob to access a slot in the symbol table (which is what a glob is).

Assigning a scalar value (the right side of the expression) to a slot in the symbol table puts it in the SCALAR slot.

See also when I asked this question: symbol/glob hash explanation

Replies are listed 'Best First'.
Re^2: Obscure ${foo} reference
by LanX (Saint) on Sep 10, 2011 at 20:24 UTC
    Correct, but ...

    Speaking of the symbol table I would avoid "slot" in favour of "entry" or "element".

    A glob is a simple hash "entry", and it's the glob which has (IIRC) exactly 6 "slots".

    Cheers Rolf