Several years ago I wrote a script using Net::Pcap and NetPacket to read a capture file - however, there is a lot of low-level decoding involved (e.g. reassembling IP fragments is fun), and a lot of re-inventing the wheel. So my suggestion would be that you use the already highly advanced features of Wireshark, which you can access from the command line via tshark, to get at the data in the capture file and filter it, and have tshark output it in a format your Perl program can parse. In your Perl program you can capture the data from tshark using a module like Capture::Tiny.
Hope this helps,
-- Hauke D