Hi All,

Now what am I doing wrong?  I need to convert the value in a
hash to a string:

$ p6 'my $x = "acme"; my Str $y; my %Vendors = ( acme => ContactName => "Larry" ); $y= %Vendors<ContactName>; say $y;'
Type check failed in assignment to $y; expected Str but got Any (Any)
  in block <unit> at -e line 1


$ p6 'my $x = "acme"; my Str $y; my %Vendors = ( acme => ContactName => "Larry" ); $y= %Vendors<ContactName>.Str; say $y;'
Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
  in block <unit> at -e line 1


Many thanks,
-T

Reply via email to