in reply to Script with tcpdump freezes

I did a search on cpan for tcpdump, and found Net::Packet::Dump. Using that might save you the trouble of writing your own code.

-- Burvil