Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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??


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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://214505]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-25 19:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found