Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: send STDOUT STDERR to function

by Khen1950fx (Canon)
on May 12, 2013 at 12:01 UTC ( #1033190=note: print w/ replies, xml ) Need Help??


in reply to send STDOUT STDERR to function

Its a FAQ. See: How can I capture STDERR from an external command?.

#!/usr/bin/perl use strict; use warnings; my $output = `whoami 2>&1`; name(); sub name { print "You are $output"; }


Comment on Re: send STDOUT STDERR to function
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2015-07-04 17:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls