in reply to Script with tcpdump freezes
Second, if you use tcpdump, use the -l flag, which will cause it to write its output as soon as it's available; otherwise it will wait until it has a full output buffer before writing anything.
Finally, consider using Net::Pcap instead; it's a native Perl interface to packet sniffing, and you'll probably find it's easier and more efficient than having tcpdump do the sniffing and parsing its output.
|
|---|