Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Re: How to collect the stdout of a subroutine call?

by Roy Johnson (Monsignor)
on Apr 19, 2004 at 19:15 UTC ( [id://346414]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: How to collect the stdout of a subroutine call?
in thread How to collect the stdout of a subroutine call?

Your subroutine prints out information, rather than returning it. If you want to capture what is printed into a variable, you would need to have it run as a separate process (see fork) so that you can read its STDOUT. (Or, the easier way, just have it build up a string and return that, as so many others have suggested.)

The PerlMonk tr/// Advocate
  • Comment on Re: Re: Re: How to collect the stdout of a subroutine call?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-04-19 08:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found