Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- # tcptest.pl
- # Brian Fitzgerald
- # 7/17/2013
- # brian@exagriddba.com
- use warnings;
- use strict;
- use IO::Socket::INET;
- if ( @ARGV != 2 )
- {
- die "usage: $0 host port";
- }
- my ( $host, $port ) = @ARGV;
- my $socket = new IO::Socket::INET (
- PeerHost => $host,
- PeerPort => $port,
- Proto => 'tcp',
- ) or die "Connect $host:$port $!";
- print "connected to $host:$port\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement