Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Print to multiple file handles at once.

by jmcnamara (Monsignor)
on Nov 20, 2002 at 15:58 UTC ( #214505=note: print w/replies, xml ) Need Help??


in reply to IO::MultiHandle - Operate on multiple file handles as one


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");    

--
John.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://214505]
help
Chatterbox?
and the daffodils sway...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2018-06-20 15:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (116 votes). Check out past polls.

    Notices?