On 1/11/19 5:08 PM, ToddAndMargo via perl6-users wrote:
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

Figured out my booboo. I had to change from

   $PartsStr =
      "Hi $Manager,<br><br>" ~
      "Account Number: <b>$AccountNo</b><br><br>" ~

to

   $PartsStr =
      "Hi " ~ $Manager ~ ",<br><br>" ~
      "Account Number: <b>" ~ $AccountNo ~ "</b><br><br>" ~

Reply via email to