Hi All
I am new to perl so had one question.
I have one Subroutine which works as expected and below is just an example.
where I ran a command and check the output.
so my question is if I have more than one command then how to check the results, meaning I want to add more command and check the results of each one after another.Thanks for your help
example of new command can be
my $command2 = fdisl -l;
my $command3 = du -f;
========================================
sub testSub{
my $variable1 = test 123;
my $variable2 = linux;
my $command1 = uanme -a ;
if ($?) {
push (@$errors ,"uname -a is failed for $hostname" );
} else {
$Log->LogInfo("uname -a passed for $hostname");