Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Print to multiple file handles at once.by jmcnamara (Monsignor) |
on Nov 20, 2002 at 15:58 UTC ( [id://214505]=note: print w/replies, xml ) | Need Help?? |
That is a nice idea and a nice implementation. However, it has some problems. The my $fh won't work with the postfix for. You would have to do something like this instead: $_->$AUTOLOAD(@args) for @$self; Also, the following won't work because MultiHandle->new() doesn't return a GLOB: print $mfh "A line of output.\n"; The following does work but it isn't as pretty: $mfh->print("A line of output.\n");
--
In Section
Cool Uses for Perl
|
|