What do you expect this code to do?
- index takes two arguments, and you have not indicated what to look for. What you've posted is a compile time syntax error.
- $output cannot have any value until after you assign it, so the print statement would need to be at the end.
- You did not follow my previous direction to wrap code in code tags.
- You still don't have a space in ls -l
- Your code will not pass strict with your placement of your print statement. See Use strict warnings and diagnostics or die.
What do you get when you run:
my $ex = QA::STK::Execute->new(ip=>'some ip',user=>'root');
$ex->command("ls-l");
my $rc = $ex->execute();
my $output = $ex->output();
print $output;
Does your module have a capability to read STDERR?
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.