my $cmd = 'wget http://... |& tee ...'; open(my $pipe, '-|', '/bin/csh', '-c', $cmd) or die $!; my $result; { local $/; $result = <$pipe>; }