Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Type Globs

by saucepan (Scribe)
on Jan 04, 2001 at 07:49 UTC ( [id://49693]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # Usage: $teed_fh = tee @output_handles;
    # Returns a new filehandle that, when written, copies to all @output_h
    +andles
    ...
        while( sysread(STDIN, my $block, 8192) ) { print $_ $block for @_ 
    +}
        kill 9,$$ or exit; # XXX Should use POSIX::_exit instead
    }
    
  2. or download this
    # Tee STDOUT to a log file
    use vars qw(*LOG);
    ...
    print "Hello, world #$_!\n" for (1..20);
    
    # XXX But, should have just used IO::Tee in first place :)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://49693]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-26 01:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found