<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/local/bin/perl -w

use strict;
use IO::Socket;

# List of Parameters
# ------------------
my($port) = @ARGV;

if (!defined($port)) {
  die "Usage: test_bnc_eph.pl portNumber\n";
}

# Local Variables
# ---------------
my($serverHostName) = "localhost";
my $server;

my $retries = 10;
while ($retries--) {
  $server = IO::Socket::INET-&gt;new( Proto    =&gt; "tcp",
                                   PeerAddr =&gt; $serverHostName,
                                   PeerPort =&gt; $port);
  last if ($server);
}
die "Cannot connect to $serverHostName on $port: $!" unless ($server);

my $buffer;
while (defined ($buffer = &lt;$server&gt;)) {
  print $buffer;
}


</pre></body></html>