From the code in Mail::Mailer I would expect a Mail::Mailer::smtp::pipe object anyway try to define the WRITE method like this:
{ package Mail::Mailer::smtp::pipe; sub WRITE { my $fh = $_[0]; print $fh substr($_[1],0,$_[2]) } } # taken from Tie::Handle or { package Mail::Mailer::smtp::pipe; sub WRITE { my $fh = $_[0]; $fh->PRINT(substr($_[1],0,$_[2])) } } or maybe { package Mail::Mailer::smtp::pipe; sub WRITE { my $fh = $_[0]; $fh->format_write(substr($_[1],0,$_[2])) } }
Of course if the glob really is Mail::Mailer::smtp define the function there :-)
If this doesn't help (this is just a wild guess!) try to use Devel::TraceSubs to see what functions are called with what parameters.
Jenda
In reply to Re: Formatted Output on glob-filehandles
by Jenda
in thread Formatted Output on glob-filehandles
by theqblas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |