This is an archived low-energy page for bots and other anonmyous visitors.
Please sign up if you are a human and want to interact.
 |
| User since: |
Mar 17, 2000 at 15:48 UTC
(25 years ago) |
[Account disabled]
| Last here: |
Jul 29, 2009 at 17:29 UTC
(16 years ago) |
| Experience: |
5661
|
| Level: | Vicar (15) |
| Writeups: |
none
|
| Location: | n/a |
| User's localtime: |
Sep 15, 2025 at 14:45 UTC
|
| Scratchpad: |
None.
|
| For this user: | Search nodes |
|
My main perl strengths are in using modules
and in programming the outside perl including DBI,
networking, IPC,
signals, date and time computations,
regular expressions, graphics
manipulation, etc...
I enjoy playing chess. You can catch
me on ICC
playing as harbinger.
Les Howard
www.lesandchris.com
Author of
Net::Syslog
and
Number::Spell
.
Sample Code Posted Here
#!/usr/bin/perl -w
use strict;
use IO::Socket;
use IO::Select;
my $s=new IO::Select;
my $ip1=IO::Socket::INET->new(LocalPort => 5925, Proto=>'udp',
LocalAddr => '127.0.0.1')
or die "error creating UDP server $@\n";
my $ip2=IO::Socket::INET->new(LocalPort => 5925, Proto=>'udp',
LocalAddr => '64.82.70.84')
or die "error creating UDP server $@\n";
$s->add($ip1);
$s->add($ip2);
while(1){
my $server;
foreach $server($s->can_read(60)){
my $newmsg;
$server->recv($newmsg,1024);
my ($rport,$ripaddr) = sockaddr_in($server->peername);
print "remote: ".inet_ntoa($ripaddr)."($rport)\n";
my ($lport,$lipaddr) = sockaddr_in($server->sockname);
print "local: ".inet_ntoa($lipaddr)."($lport)\n";
}
}
|