sans-clue has asked for the wisdom of the Perl Monks concerning the following question:
Here is my basic attempt, which connects but doesn't print anything.Escape character is '^]'. cla;ccc}Q&P !cmcz«¦¢º€¡¦¢€ccmcz«¦¢º€¡¦¢€ccmcz«¦¢º€¡¦¢€ccmcz«¦¢º€¡¦¢€cc +mcz«¦¢º€¡¦¢€ccmcz«¦¢º€¡¦¢€ccmcz«¦¢º€¡¦¢€c^] telnet> quit
Any ideas of what to try ? Thanks#!/usr/bin/perl use IO::Socket::INET; use Convert::EBCDIC; my ($socket,$client_socket); $socket = new IO::Socket::INET ( PeerHost => '1.2.3.4', PeerPort => '6106', Proto => 'tcp', ) or die "ERROR in Socket Creation : $!\n"; print "TCP Connection Success.\n"; # read the socket data sent by server. $data = <$socket>; print "Received from Server : $data\n"; $data = ebcdic2ascii($data); print "Received from Server after : $data\n"; sleep (10); $socket->close();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::Telnet to IO::Socket::INET
by BrowserUk (Patriarch) on Mar 08, 2013 at 11:05 UTC | |
by salva (Canon) on Mar 08, 2013 at 18:03 UTC | |
by BrowserUk (Patriarch) on Mar 08, 2013 at 18:12 UTC | |
by sans-clue (Beadle) on Mar 08, 2013 at 17:03 UTC | |
|
Re: Net::Telnet to IO::Socket::INET
by andal (Hermit) on Mar 08, 2013 at 10:38 UTC |