in reply to Re^2: Can't use string
in thread Can't use string

Are you referring to the fact that a symbol table is a sort of hash and that the code results in a lookup of the package's symbol table?

If you start calling that a hash lookup, you must also call $_ in print("$_\n") a hash lookup — it's the same op — and the term becomes useless.

No, the OP *isn't* using a hash.

Replies are listed 'Best First'.
Re^4: Can't use string
by plobsing (Friar) on Feb 01, 2008 at 05:34 UTC
    Yes. Sort of.

    I understand that stashes are special hashes, but my point was more that the OP was making use of a facility that gives the behaviour of a hash, not the underlying mechanism.

    However, I disagree with your argument. You only use what you are requiring to be exposed to you. A simple variable lookup does not necessarily imply hash use from a user perspective. There's a layer of abstraction present. This abstraction can be done independent of the hash implementation. Just look at how lexicals work.

    Only when you the user takes away the layer of abstraction shielding the hash lookup does it become use from the users perspective. That is what has occurred here, therefore it is using a stash as a hash.

      You're talking about the intent of the programmer, of the code. Numbered rows would more likely be an array lookup then a hash lookup, which is why I suggested he actually use an array.

      What was the point of your message? It was already clear that I believed the OP's was using an array/hash (your definition). Why else would I have suggested that he use an array/hash (the type).