[Israel.pm] FORMAT question

Uri Bruck bruck at actcom.net.il
Tue Jul 4 15:12:25 PDT 2006


Offer Kaye wrote:
> Hi Perl Gurus,
> In trying to output text tables, I tried to use Perl's FORMAT (perldoc
> perlform) and I've run into a problem.
> It seems I cannot define 2 different formats for the same filehandle.
> So for example, I can't have 2 different tables (with different
> formats) in the same file.
> 
> A workaround is to close the file, reopen in append mode with a
> different filehandle name and define the second format with this name.
> Ugly, but works.
> A better workaround I've found is to use Text::Table :)
> 
> In-spite of having workarounds, I'd still appreciate answers to the
> the following 2 questions:
> 1. Is there another way to define 2 different formats for the same file?
> 2. If not, how would you print a table in text format? Text::Table or
> some other way?
I'd use printf

> 
> Regards,


-- 
Thanks,
Uri
http://translation.israel.net



More information about the Perl mailing list