in reply to Re: Redirecting Output to shell command from within perl (Update "close PIPE")
in thread Redirecting Output to shell command from within perl
After this line:
open STDOUT, '| wc -l' or die "$! / $^E";
Anything the program prints, will be piped to wc and the count will show up on the command line when the script exits.
Add:
open STDERR, '&STDOUT';
And wc will see STDERR also.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Redirecting Output to shell command from within perl
by LanX (Saint) on Feb 17, 2018 at 21:58 UTC | |
by BrowserUk (Patriarch) on Feb 18, 2018 at 16:37 UTC | |
by LanX (Saint) on Feb 18, 2018 at 18:08 UTC | |
by BrowserUk (Patriarch) on Feb 19, 2018 at 09:06 UTC | |
by LanX (Saint) on Feb 19, 2018 at 10:22 UTC |