Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^3: Hash Curious

by gfldex (Initiate)
on Oct 18, 2021 at 19:46 UTC ( #11137699=note: print w/replies, xml ) Need Help??

in reply to Re^2: Hash Curious
in thread Hash Curious

I don't quite agree with this table. Please consider the following code.
constant term:<$container> = 1,2,3; say $container, $container.WHAT; # (1 2 3)(List) say "answer: $container"; # answer: 1 2 3 dd $container; # (1, 2, 3) # note the lack of naming of the container sub s($first, *@rest){ dd $first, @rest; } s($container); # $(1, 2, 3) # Array element = []
Here, $container is not a container. It is a List of Values and also a scalar. In quote interpolation it is handled like a list but in a signature as a scalar. In plain Raku (not in a signature, not in a quote, regex, etc.) '$' may not indicate Scalar.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11137699]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2023-02-09 00:36 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (44 votes). Check out past polls.