I would turn to proven solutions instead of writing a multithreaded solution in Perl for network sniffing:
- Net::PCap and Net::PCapUtils are interfaces to libpcap, a capturing library. libpcap also does buffering, so you could be able to get away without losing data when writing.
- Use ethereal to capture the data and process the capture files afterwards through Perl. This has the advantage of using a tried and true network sniffer, relieving you of all the hassles.