| ▲ | darrenf 3 hours ago | |
In the main, the sigil refers to the type of the eventual value, regardless of what contains it. The tl;dr is that you mostly use `$` unless you're wanting more than one value, or to dereference (when you use the sigil for the type of reference). Some examples:
Where things become a bit less regular is the difference between reference and non-reference for hashes and arrays when they are top level. At the top level, you need a `->` but that becomes optional at levels below (because at levels below, they have to be references).
And then there's stuff like getting a slice out of an arrayref
So... yeah. | ||
| ▲ | zahlman 2 hours ago | parent [-] | |
> Where things become a bit less regular is the difference between reference and non-reference for hashes and arrays when they are top level. At the top level, you need a `->` but that becomes optional at levels below Yes, that's probably what I was remembering. Thanks for the exposition. | ||