Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Answer: How do I invoke a procedure on a server remotely?

by Mago (Parson)
on Jul 08, 2003 at 20:46 UTC ( #272456=categorized answer: print w/replies, xml ) Need Help??

Q&A > network programming > How do I invoke a procedure on a server remotely? - Answer contributed by Mago

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; }

Log In?

What's my password?
Create A New User
talexb concurs .. almost 16 years here.
[TStanley]: Time flies when you're busy :D
LanX hasn't entered monk puberty yet
erix clocks 12 years
[TStanley]: talexb I was actually in your area last week. I was working in Milton, Ontario at the hospital they are building there.
Eily hasn't entered monk school

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (13)
As of 2017-06-23 13:55 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (547 votes). Check out past polls.