The module which you should be looking at is
Net::Pcap - This module serves as an interface to the libpcap library which is similarly used for network packet capture by tcpdump. I have previously written an article on the use of this module for The Perl Journal which can be downloaded with login credentials
here (or from the Google cache
here)
perl -le "print unpack'N', pack'B32', '00000000000000000000001000000000'"