Cool Perl 6: Displaying hash contents
Perl 5:
for (keys %scores) { print "$_ = $scores{$_}\n"; }
Perl 6:
say ~%scores; .say for %scores;
Perl 6 | Perl 6 today | #27 |
Perl 5:
for (keys %scores) { print "$_ = $scores{$_}\n"; }
Perl 6:
say ~%scores; .say for %scores;
Copyright © 2009 http://www.pmichaud.com/2009/pres/ |