brscvs has asked for the wisdom of the Perl Monks concerning the following question:
curl command returns a success and when I run the script it prints to stderr and I can see it on console. How to capture response of curl and why it prints stdout of curl command to stderr of my script. What is the correct way to do this with pipes.my $postjson = ''; ## a big input normally my $response= open(PIPIE,'|curl -d @- destination') or die "smth"; print PIPIE $postjson; close PIPIE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: capturing stdout of pipe
by hippo (Archbishop) on Nov 14, 2019 at 13:45 UTC | |
by Corion (Patriarch) on Nov 14, 2019 at 19:20 UTC | |
by haukex (Archbishop) on Nov 14, 2019 at 19:09 UTC |