Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: perl script

by kennethk (Abbot)
on Jan 12, 2017 at 23:54 UTC ( [id://1179480]=note: print w/replies, xml ) Need Help??


in reply to Re^2: perl script
in thread perl script

What do you expect this code to do?
  1. index takes two arguments, and you have not indicated what to look for. What you've posted is a compile time syntax error.
  2. $output cannot have any value until after you assign it, so the print statement would need to be at the end.
  3. You did not follow my previous direction to wrap code in code tags.
  4. You still don't have a space in ls -l
  5. 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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1179480]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-04-20 03:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found