$command = "curl -D- http://www.perlmonks.org"; # mixes stderr and st +dout # stdout only, no stderr noise $stdout_only = `$command 2>/dev/null`; # stderr only, no stdout noise $stderr_only = `$command 2>&1 1>/dev/null`; # both mixed up (usually not a good idea!) # Aliens suggestion to use open3 is better in this case. $brundlefly = `$command 2>&1`;
In reply to Re^3: Output of a command
by Perlbotics
in thread Output of a command
by Niel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |