Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Unable to redirect stderr to stdout

by pvaldes (Chaplain)
on Jul 03, 2014 at 09:53 UTC ( #1092130=note: print w/replies, xml ) Need Help??


in reply to Unable to redirect stderr to stdout

try with system()

perl -e 'my $result = system("ls 2>&1"); print $result;'

But this should be ok, also. There is something here that we don't know

perl -e 'my $result = `ls -3 2>&1`; print $result;' perl -e '`ls -3 2>&1`;' # <-- please note that this other one is silen +t

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2019-10-23 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?