in reply to Re^3: Perl 6, defining a hash with interpolated string
in thread Perl 6, defining a hash with interpolated string
I noticed playing with this code that the output of .perl differs depending on if the colon is in front of the variable:
say :%kv4.perl; #"kv1" => {"LiteralKey" => "LiteralValue"} say %kv4.perl; #{"LiteralKey" => "LiteralValue"}
the colon seems to be plucking the Hash's name and creating a Pair with it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Perl 6, defining a hash with interpolated string
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 |