|
|
| Do you know where your variables are? | |
| PerlMonks |
Re: IO::Tee and write / formatby broomduster (Priest) |
| on Oct 17, 2008 at 13:24 UTC ( #717728=note: print w/ replies, xml ) | Need Help?? |
|
You need the format_write and format_top_name methods (and maybe others, depending on how sophisticated your form handling needs to be). IO::Tee inherits some format-handling code from IO::Handle. The docs for IO::Tee really only mention it in passing, but it becomes clearer in the docs for IO::Handle, and you need to be sure to tell IO::Tee specifically about things like which format to use for top-of-form (which is "automatic" for STDOUT and the like). The following code snippet should get you started. Notice that since the name of the format is passed down to IO::Tee, you need to specify the full package name of the format (o/wise you get complaints about undefined formats from IO::Tee).
From the shell:
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||