while(1) { open(IN, "tcpdump -nelttti pflog0 2>&1 |"); while () { $sth->execute($stuff); } close(IN); }