summaryrefslogtreecommitdiff
path: root/nocompile/bin/nc.pl
blob: ff52ab798b96730331adff8d77495383bbfb7f60 (plain) (blame)
1
2
3
#!/usr/pkg/bin/perl
use IO::Socket;
$s=IO::Socket::INET->new(PeerAddr=>"$ARGV[0]:$ARGV[1]",Proto=>"tcp",Timeout=>1);if(fork()){while($l=<stdin>){print $s $l;}}else{while($l=<$s>){print $l;}}