develooper Front page | perl.perl6.users | Postings from December 2019

where is my map typo?

Thread Next
From:
ToddAndMargo via perl6-users
Date:
December 4, 2019 10:18
Subject:
where is my map typo?
Message ID:
93ad0890-b21b-00d2-da2b-3c8ba9bc613d@zoho.com
Hi All,

I am going through the examples on
    https://docs.perl6.org/type/Map.html

$ p6 "my $map = Map.new('a', 1, 'b', 2); say $map{'a'}; say $map{ 'a', 
'b' };"
===SORRY!=== Error while compiling -e
Malformed my
at -e:1
------> my⏏  = Map.new('a', 1, 'b', 2); say {'a'};

What the heck is a 'Malformed my"?  I copied and pasted
from the second set of examples.

And why is the first example:
      %e := Map.new
and the second example
      $e = Map.new
?

Many thanks,
-T

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About