Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Streaming to Handles

by Stevie-O (Friar)
on May 01, 2004 at 18:52 UTC ( [id://349663]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      #foo() is the sub that outputs a lot of data
      my $pid = open(SUBOUT, '-|');
    ...
        $|=1; foo(); exit(0);
      }
      while (<SUBOUT>) ...
    
  2. or download this
    #!/usr/bin/perl -l
    defined($tmp = open(FOO, '-|')) or die "Can't fork: $!";
    ...
    }
    
    print for map {chomp; "[$tmp] {$_}"} <FOO>;
    
  3. or download this
    $"=$,,$_=q>|\p4<6 8p<M/_|<('=>
    .q>.<4-KI<l|2$<6%s!<qn#F<>;$,
    .=pack'N*',"@{[unpack'C*',$_]
    }"for split/</;$_=$,,y[A-Z a-z]
             {}cd;print lc
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-04-23 07:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found