in reply to Variable name

Everyone's been very helpful, so I think one of us is entitled to be cranky: Why are we humouring you (as opposed to linking to Why it's stupid to use a variable as a variable name)? That is, is this approach actually essential for some application, or were you puzzling out for “academic” interest why a construct wasn't working as expected (or is it some more sinister other, like that you're intending to use soft references after all?).

Replies are listed 'Best First'.
Re^2: Variable name
by Joost (Canon) on Dec 08, 2008 at 22:44 UTC
    In the OP's defense, there are still plenty of uses for symbolic references. Especially when you're building code that generates functions / classes / packages.

    Symbolic refs are notoriously easy to get wrong, but perl's code-generation constructs are only just about adequate, and it's usually a case of either using symbolic refs or eval STRING, and eval STRING is usually just too messy (and slow).