#!/usr/bin/perl #Client Script use IO::Socket; #domain name suffix - if we need it $domainName=""; $nodeName = ""; if (! $FORM{"\$selected_rows.Node"}) { print "

No Node Specified.

"; die; } else { $nodeName = $FORM{"\$selected_rows.Node"}.$domainName; print "

Pinging host ".$nodeName."

\n"; } $sock = new IO::Socket::INET (PeerAddr => '172.30.166.234', PeerPort => 23 , Proto => 'tcp', ); print "

LINE AFTER SOCKET CREATION".$sock."

\n"; die "Socket could not be created. Reason: $!\n" unless $sock; print "

Socket could not be created. Reason: $!\n".$sock."

\n"; print $sock "ping:".$nodeName."\n"; print "Client Connected. \n"; print "Server says: ",scalar(<$sock>); print $sock "Message acknowledged from the client!\n"; print $sock "Good Bye from client! \n";