in reply to Re^2: Using IPC::Open3 instead of backtick operator
in thread Using IPC::Open3 instead of backtick operator
Main:
PrintStdoutStdErr.pl#!/usr/bin/perl use warnings; use strict; open (IN, '-|', 'perl PrintStdoutStdErr.pl') or die "$!"; while (<IN>) { print; } __END__ prints: this went to STDERR this went to STDOUT
I actually wouldn't worry about Perl critic on an "ls" command.#!/usr/bin/perl use warnings; use strict; $|=1; print STDOUT "this went to STDOUT\n"; print STDERR "this went to STDERR\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Using IPC::Open3 instead of backtick operator
by Anonymous Monk on Jun 10, 2016 at 20:59 UTC |