Hello Folks,

I want to create a chuck of code that will take a list of instructions
(things one would type at a shell) and have them run one by one until
complete, then gracefully log out. Anyone have any suggestions? I
would like something that looks similar to this:

my @instructions = ("ping this","run this","open this","rm
this","mkdir some/dir")
$ssh = Net::Some::AwsomePM->new();
foreach $cmd (@instructions){
        $ssh->cmd($cmd);
        wait_for_cmd_to_finish;
}
$ssh->cmd('exit');

If anyone can post a sample of what this would look like that would be
the most helpful as I am still getting my bearings here.

Cheers,

Bob H


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to