However, the results are buffered if I pipe it to "perl -pe 1"
You'll find they're probably buffered if you pipe to anything ( even cat )
So the solution is to ddg://tcpdump buffered and find tcpdump: Re: pipeline buffering which says
if you don't specify -w, -U means "flush the standard output after the information for each packet is printed"
So there you have it, install sufficiently modern version of tcpdump that comes with -U option that flushes more often
FYI there also exists pcapdump, Net::Pcap::Easy... Tutorials: Network Programming: Perl and Net::Pcap
In reply to Re^5: Autoflush fails
by Anonymous Monk
in thread Autoflush fails
by sophate
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |