in reply to Net::Pcap print ip address

What you really need is a "dissector" - packet capture speak for a framework / library that can take a raw packet and parse / separate the constituent headers and name/value pairs.

Have a look at Net::Frame and Net::Frame::Simple (you'll need both) which comes with some examples and makes this task trivial.