my $tn; # Telnet connection initilized sub TNcommand { my($command) = $_[0]; &RunLog (" : Running command = $command"); $tn->cmd(String => $command, Prompt => '/\>$/'); return; } sub TNprint { my($command) = $_[0]; &RunLog (" : Running print command = $command"); $tn->print("$command"); return; } sub TNwriteFile { my($out_fname) = $_[0]; my($NextLine) = "1"; open (SAIDA, ">$out_fname"); while ($NextLine) { if ($NextLine = $tn->getline(Timeout => 15)) { $NextLine =~ s/\r//; print SAIDA $NextLine; } } close SAIDA; return; }
In reply to Re: How do I invoke a procedure on a server remotely?
by Mago
in thread How do I invoke a procedure on a server remotely?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |