![]() |
|
"be consistent" | |
PerlMonks |
Re: capturing stderr of echo piped to a fileby Crackers2 (Parson) |
on Oct 28, 2014 at 22:10 UTC ( #1105381=note: print w/replies, xml ) | Need Help?? |
Your redirection is in the wrong order:
Writing that out, you end up with
Which means redirect STDOUT to the file, then STDERR to (current) STDOUT, i.e. also to the file. You probably want
instead, i.e. redirect STDERR to STDOUT, then STDOUT (but not the redirected STDERR) to the file.
In Section
Seekers of Perl Wisdom
|
|