in reply to Raku: problem with say() function

I'm no Raku user, but I know that the syntax for $hash{key} is now %hash<key> (for non quoted keys).

It looks like the parser gets confused looking for a hash element inside string interpolation (independent from 'say')

Maybe try quoting the < with \<

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^2: Raku: problem with say() function (method?)
by 7stud (Deacon) on Feb 07, 2024 at 16:13 UTC

    Thanks Rolf.

    It's a little disconcerting, but the Hash docs don't explain the <> notation. As far as I can tell, it's the same as qw. I found docs on "Word quoting" here.

    say <a b c> eqv ('a', 'b', 'c');   # OUTPUT: «True»

    And, there are some examples at Raku By Example: Hashes:

    say %person-age{'Joan'}; # accessing an element say %person-age<Ben>; # same as above but the quote-words operator