I would like to send the output from a command to both STDOUT and to a variable. I want to combine:
my $var = `some command` ; system( \'some command\' )
my $output = system("your command | tee /dev/tty");
Worked for me!!