status.pl 285 B

12345678
  1. #!/usr/bin/perl -w
  2. use strict;
  3. use IO::Socket::UNIX qw( SOCK_STREAM );
  4. $ARGV[0] or die("Usage: status.pl <socket>\n");
  5. my $socket = IO::Socket::UNIX->new(Type => SOCK_STREAM, Peer => $ARGV[0],) or die("Can't connect to server: $!\n");
  6. foreach my $line (<$socket>) {
  7. print $line;
  8. }