Perl 6 Cool Perl 6 #38

The .fmt method

 
 
             $g.value».invert».fmt("  %-32s %s");

 .fmt converts a value into a string using a sprintf-like fmt.

For Pairs, the arguments to .fmt are the key and value.

After ».invert, we have a list of "name => email" pairs.

 ».fmt applies the formatting string to these pairs.

Copyright © 2010
http://www.pmichaud.com/2010/pres/