Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: equivalent to prove?

by samtregar (Abbot)
on Jan 29, 2009 at 22:15 UTC ( #740049=note: print w/replies, xml ) Need Help??


in reply to equivalent to prove?

It's easy to capture STDOUT and then send it along. When you launch your sub-script do it like this:

   open(SUB, "sub.pl |") or die $!

The "|" at the end tells Perl to do a fork()/exec() and hook up STDOUT from sub.pl to your SUB filehandle. Then you can do:

while (my $line = <SUB>) { # do something with $line... # then print it out: print $line; }

Give it a try and post again if you run into trouble.

-sam

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2020-07-06 11:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?