News for hackers. Stuff that matters.
Re:The Perl Foundation will now be known as The Perl and Rak... by cesarb on Monday October 31, 2022 @11:38AM (#33407342)
> Perl has symbols do represent lists(@), associative arrays(%), scalars($).

It's been a long time since I last programmed in Perl, but as I recall the confusing part was that for instance a list might use @ or $ depending on what you're doing with it, and the same for associative arrays, which might use % or $ depending on what you're doing with it; the same variable might use different sigils in different parts of your code, instead of staying with the same sigil for its whole lifetime.

Re:The Perl Foundation will now be known as The Perl and Rak... by toast0 on Monday October 31, 2022 @11:56AM (#33407614)
The sigil represents the type of the thing you're accessing, not the type of where it comss from.

$ means a scalar (number, string, reference)

@ means an array/list

% means a hash (also known in other languages as a map, associative array, etc)

A list item and hash keys and values are all scalars. So the array is @foo, but the items are $foo[0], etc. References get a bit ugly if you need to access a whole container whose reference is stored in another container, and also if references are used gratiutously: I've worked in code where no arrays or hashes were used, only ArrayRefs and HashRefs, ugh.