- or download this
use String::ShellQuote qw( shell_quote );
my $cmd = shell_quote('csh', '-c', 'wget http://... |& tee ...');
my $result = `$cmd`;
- or download this
my $cmd = 'wget http://... |& tee ...';
open(my $pipe, '-|', '/bin/csh', '-c', $cmd) or die $!;
my $result; { local $/; $result = <$pipe>; }
- or download this
my $cmd = 'wget http://... 2>&1 | tee ...';
my $result = `$cmd`;