#!/usr/bin/perl -w
#############################################################
#                                                           #
#     Pipe demonstration program for sending to a pipe      #
#                                                           #
#############################################################

while (1) {
  $ps = "uptime";
  @rp = readpipe ($ps);
  $a = $rp[0];
  $a =~ m/up\s+(\d+:\d+),\s+\d+ user/;
  $b = $1;
  open (PIPE, "+<webctr") or die $!;
    print PIPE "ut $b\n";
  close PIPE;
  sleep 1;
} 
