Mpm chapter 6

This works, although if you're printing elements of an array it's probably a bit clearer to go via a foreach loop, like:

printf ( $template, $_, $ENV{$_} ) foreach sort keys %ENV;