in reply to Re^4: Adjusting variable context when working with JSON data?
in thread Adjusting variable context when workign with JSON data?

Preceding with a backslash creates a reference to the operand. De-referencing is the opposite of this. Do have a read of the intro to references tutorial, perlreftut and perlref for getting started with references.


🦛

  • Comment on Re^5: Adjusting variable context when working with JSON data?

Replies are listed 'Best First'.
Re^6: Adjusting variable context when working with JSON data?
by unmatched (Sexton) on Dec 09, 2024 at 10:56 UTC
    Oh, I see. I got it completely backwards. For some reason I thought that `$` was used only for scalar values. Will read more on this, thanks again!
      For some reason I thought that `$` was used only for scalar values.

      Well, yes. A reference is a scalar variable. It contains one value: The reference (in the old days we might have called it the "address") to something else.

      The nature of that "something else" is irrelevant to the typing of the reference -- it is a scalar.