Hello,
I have a program that issues some system calls. I would like to do 2 things in my function - The system call's output should be stored in a variable and also output to STDOUT.
I guess I am asking for a way to combine both system and qx( backtick ). Is this even possible?
Here is a snapshot of my code:
#!usr/bin/perl
use strict;
use warnings;
my $cmd = qx("ls -l");
print "$cmd";