in reply to Re: How to output backtick or qx to a variable and STDOUT at the same time?
in thread How to output backtick or qx to a variable and STDOUT at the same time?

Thank you! Looking over at Capture::Tiny's doc, I found tee. Which is exactly what I needed. Output both to STDOUT and store in a variable for later use.
#!usr/bin/perl use strict; use warnings; use Capture::Tiny qw(capture tee); my ($stdout, $stderr, $exit) = tee { system('ls', '-l'); }; print $stdout;
  • Comment on Re^2: How to output backtick or qx to a variable and STDOUT at the same time?
  • Download Code