גאבור סבו - Gábor Szabó > Perl6-Cookbook > lib/Perl6/Cookbook/05_Hashes.pod

Download:
Perl6-Cookbook-0.05.tar.gz

Annotate this POD

View/Report Bugs
Source  

01 Adding an Element to a Hash ^

   #!/usr/bin/perl6
   use v6;
   
   # 
   
   my %person = (
       fname => 'Foo',
       lname => 'Bar',
   );
   %person{"fname"}.say;
   %person{"lname"}.say;
   
   %person{"email"} = 'foo@bar.com';
   %person{"email"}.say;
syntax highlighting: