in reply to Re^5: Using variables in array names
in thread Using variables in array names

But that doesn't make the solution invalid.
No, and I never claimed it was invalid. I just objected to the phrasing that "you will be fine" - as it suggests you're suddenly immune from the perils of symbolic references. That's what I objected to.

Replies are listed 'Best First'.
Re^7: Using variables in array names
by blazar (Canon) on Aug 05, 2005 at 14:45 UTC
    Well, if you don't use symbolic references then you're immune from the perils of symbolic references... your point, I think, was that using a complex structure, e.g. a HoA is not much advantageous over symrefs. Indeed the risk in connection with typos is exactly the same, but with what isn't it? And the problem with symrefs is that you're still manipulating package variable, whereas a hash can be a lexical one which often is better suited for whatever use one has in mind...
Re^7: Using variables in array names
by herveus (Prior) on Aug 05, 2005 at 14:26 UTC
    Howdy!

    Your words conveyed a different impression.

    ...and I disagree with your statement...

    If you use a real hash (lexical, please) instead of symbolic references, you *are* immune to the perils of *symbolic references*. The problem of mistyping individual hash keys is a separate problem that afflicts both approaches. The big peril of symbolic references is that you have to take additional care to avoid stomping on the package variable names you create ad hoc.

    Your objection conflates these to facets.

    yours,
    Michael