Displaying the contents of a hash
Perl 6:
say ~%h;
- ~ is the "string context" prefix
- evaluates its argument in string context
- hashes in string context now produce key, tab, value, newline
Perl 6 | Perl 6 today | #21 |
Perl 6:
say ~%h;
Copyright © 2009 http://www.pmichaud.com/2009/pres/ |