in reply to Re^2: Perl 6, defining a hash with interpolated string
in thread Perl 6, defining a hash with interpolated string
gives youuse v6; my %kv1 = :LiteralKey<LiteralValue>; say :%kv1.perl; my %kv2 = <LiteralKey>,<LiteralValue>; say :%kv2.perl; my $var3 = 'Literal'; my %kv3 = "{$var3}key",'LiteralValue'; say :%kv3.perl; my $var4 = 'LiteralKey'; my %kv4 = "$var4",'LiteralValue'; say :%kv4.perl;
"kv1" => {"LiteralKey" => "LiteralValue"} "kv2" => {"LiteralKey" => "LiteralValue"} "kv3" => {"Literalkey" => "LiteralValue"} "kv4" => {"LiteralKey" => "LiteralValue"}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Perl 6, defining a hash with interpolated string
by Mr_Micawber (Beadle) on Aug 04, 2010 at 21:23 UTC | |
by molecules (Monk) on Aug 05, 2010 at 11:53 UTC | |
by Mr_Micawber (Beadle) on Aug 05, 2010 at 12:41 UTC | |
by molecules (Monk) on Aug 05, 2010 at 21:07 UTC |