Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Re: Re: using format to alignby TheDamian (Vicar) |
on Mar 28, 2003 at 02:15 UTC ( [id://246384]=note: print w/replies, xml ) | Need Help?? |
As rinceWind said (and as Larry made official in Apocalypse 6), in Perl 6 formats are being reworked under my evil influence. For a taste of what they'll be like, see the Text::Reform module.
Using that module, your table would be generated like so: Or, if your data was likely to spill over multiple pages, you might prefer more sophisticated headers and footers: Note in particular the use of a (conditional, nested) call to form within the footer of the main form. The Perl 6 format syntax will be even more sophisticated than that provided by Text::Reform, since I'll be taking advantage of new features of Perl 6. For example, the named options that control headers/footers/etc won't need to be in hashes, and array arguments won't require an explicit backslash. There will also be additional formatting modes and options, all of which will eventually be described in Exegesis 7.
In Section
Seekers of Perl Wisdom
|
|