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

Re: I need hash inside a hash help

Thread Previous | Thread Next
From:
JJ Merelo
Date:
January 11, 2019 19:45
Subject:
Re: I need hash inside a hash help
Message ID:
CAJoLtgf+pwmS+uVdB=pAOigMbCQxNee+xthjAJXjDm7RTTPi6A@mail.gmail.com
You don't need to quote "%Vendors<{"$x"}><ContactName>"By doing so, you're
closing the quotes right behind {

Cheers

El vie., 11 ene. 2019 a las 20:39, ToddAndMargo via perl6-users (<
perl6-users@perl.org>) escribió:

> On 1/11/19 11:33 AM, JJ Merelo wrote:
> > I think you want $x, not $Ace.
> >
> > Cheers
>
> Yup.  I am on fire today!  :'(
>
> Still can't get it figured out.  :'(  :'(
>
> $ p6 'my $x="Ace"; my %Vendors=("acme" => { "ContactName" => "Larry",
> "AccountNo" => 1234 }, "Ace" => { "ContactName" => "Mo", "AccountNo" =>
> "A102" } ); say "%Vendors<$x><ContactName>" ~ "\t" ~
> "%Vendors<$x><AccountNo>";'
> Use of uninitialized value of type Any in string context.
>
>
> $ p6 'my $x="Ace"; my %Vendors=("acme" => { "ContactName" => "Larry",
> "AccountNo" => 1234 }, "Ace" => { "ContactName" => "Mo", "AccountNo" =>
> "A102" } ); say "%Vendors<"$x"><ContactName>" ~ "\t" ~
> "%Vendors<"$x"><AccountNo>";'
> Use of uninitialized value of type Any in string context.
>
> $ p6 'my $x="Ace"; my %Vendors=("acme" => { "ContactName" => "Larry",
> "AccountNo" => 1234 }, "Ace" => { "ContactName" => "Mo", "AccountNo" =>
> "A102" } ); say "%Vendors<{$x}><ContactName>" ~ "\t" ~
> "%Vendors<{$x}><AccountNo>";'
> Use of uninitialized value of type Any in string context.
>
> $ p6 'my $x="Ace"; my %Vendors=("acme" => { "ContactName" => "Larry",
> "AccountNo" => 1234 }, "Ace" => { "ContactName" => "Mo", "AccountNo" =>
> "A102" } ); say "%Vendors<{"$x"}><ContactName>" ~ "\t" ~
> "%Vendors<{"$x"}><AccountNo>";'
> Use of uninitialized value of type Any in string context.
>
>
> I can't win.
>


-- 
JJ

Thread Previous | 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