in reply to IP Packet count at regular intervals of time

If I understand clearly you need to capture packets in the specified period. In this case, you can use module Net::PcapUtils, for example:

#!/usr/bin/perl -w use strict; use warnings; use Net::PcapUtils; my $pk_descr = Net::PcapUtils::open(FILTER => 'ip'); my $period = 1; my $now = time; my $till = $now + (60 * $period); my ($packet, %header); while (($now = time) < $till) { ($packet, %header) = Net::PcapUtils::next($pk_descr); print "Got packet: $packet !!!"; }

Hope it helped.

-- Michael Stepanov