Help for this page
my ($prot,$recv_q,$send_q,$laddr,$lport,$eaddr,$eport,$status,$syn) = map {split ':'} split " ";
open NETSTAT, '-|', '/bin/netstat', '-na' or die $!; while (<NETSTAT>) { ... if $sockdata[7] =~ /syn/i; printf "Local: %s:%s - External: %s:%s - %s$/", @sockdata[3..7]; }