in reply to When will "Using a hash as a reference is deprecated" be enforced?

"Using a hash as a reference is deprecated"

I guess I don't get what you mean from what you write. Could you provide a code example on how that's done?

I know of hashes, and anonymous hashes, and taking references to a named hash, and passing around hash references (i.e. scalars). But "using a hash as a reference" sounds to me like some not-yet-heard-of magic of evaluating a hash (in scalar context?) and getting a reference to a hash thereof. Hmm.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
  • Comment on Re: When will "Using a hash as a reference is deprecated" be enforced?

Replies are listed 'Best First'.
Re^2: When will "Using a hash as a reference is deprecated" be enforced?
by Joost (Canon) on Mar 22, 2007 at 23:15 UTC
      Wow. I wonder how much thought and discussion went into this dwimmery now deprecated? What more of the like is in perl that I don't know?

      I'm unable to interprete the shudders runinng down my back after knowing this right now. Pleasure? Fright? Have to work that out...

      --shmem

      _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                    /\_¯/(q    /
      ----------------------------  \__(m.====·.(_("always off the crowd"))."·
      ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
        What more of the like is in perl that I don't know?
        got me thinking, so i tried it with an array. wacky!
        % perl -Mwarnings -Mstrict -e 'my @a = (1); print @a->[0]'
        Using an array as a reference is deprecated at -e line 1.
        1