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

Re: I need hash inside a hash help

Thread Previous | Thread Next
From:
ToddAndMargo via perl6-users
Date:
January 11, 2019 19:55
Subject:
Re: I need hash inside a hash help
Message ID:
6114194e-ff55-863e-be34-3cee9ecceb7f@zoho.com
On 1/11/19 11:50 AM, Bruce Gray wrote:
> 'my $x = "Ace"; my %Vendors = ( acme => { ContactName => "Larry", AccountNo => 1234 }, Ace => { ContactName => "Mo", AccountNo => "A102" } ); say %Vendors{$x}<ContactName> ~ "\t" ~ %Vendors{$x}<AccountNo>;’

Hi Bruce,

Sweet!  Thank you!

$ p6 'my $x = "Ace"; my %Vendors = ( acme => { ContactName => "Larry", 
AccountNo => 1234 }, Ace => { ContactName => "Mo", AccountNo => "A102" } 
); say %Vendors{$x}<ContactName> ~ "\t" ~ %Vendors{$x}<AccountNo>;'

Mo	A102

-T

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