in reply to Re: Writing to a file using Formats
in thread Writing to a file using Formats

While the comments here are great, I've personally found using the Perl6::Form module to be easier to use, less finicky, and has made my code more readable and maintainable. It's written by Damian Conway; he recommends it in his book _Perl Best Practices_.

An example from the CPAN page:

use Perl6::Form; $text = form " =================================== ", "| NAME | AGE | ID NUMBER |", "|----------+------------+-----------|", "| {<<<<<<} | {||||||||} | {>>>>>>>} |", $name, $age, $ID, "|===================================|", "| COMMENTS |", "|-----------------------------------|", "| {[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[} |", $comments, " =================================== ";

-- Burvil