Help for this page

Select Code to Download


  1. or download this
    my $dbh=DBI->connect("DBI:mysql:database=pings;host=$host;mysql_connec
    +t_timeout=10","$user","$password") or die "$!\n";
    $sth=$dbh->prepare("LOAD DATA LOCAL INFILE 'MYFIFO' INTO TABLE $table 
    +FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'") or print "$!\n".$
    +dbh->{'mysql_error'};
    ...
    $sth->finish() or print "$!\n".$dbh->{'mysql_error'};
    $dbh->disconnect() or print "Trouble disconnecting! $!\n";
    
  2. or download this
    while (1) {
      if (fifo_is_ready()) {
    ...
          sleep(2);
       }
    }