noname has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks , can you please explain me why output redirection doesn't work for the next perl code ( actually it is not only perl's problem but also shell)
so , if I run in my bash or zshit doesn't get redirected to /tmp/xx I tried to redirect STDERR likeecho test | perl -pe 's/st/AB/'; >/tmp/xx
but it also doesn't work . I think it comes from the way perl prints the result , but I can't understand it .echo test | perl -pe 's/st/AB/'; >/tmp/xx 2>&1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: output redirection when calling perl from shell - perl -pe "blabla"
by jethro (Monsignor) on Oct 15, 2010 at 11:28 UTC | |
by noname (Sexton) on Oct 15, 2010 at 11:35 UTC | |
|
Re: output redirection when calling perl from shell - perl -pe "blabla"
by kcott (Archbishop) on Oct 16, 2010 at 04:24 UTC |