open(TCPIN, "/usr/sbin/tcpdump -n -p tcp |"); while (1) { # Method 1 die "Aiii! $!" if !sysread(TCPIN, $_, 1024); # Method 2 $_ = ; # Of course, both of these methods aren't used at the same time! # Parsing stuff here (this is really fast, so the problem isn't here) }