Yeah, unfortunately, with my current grasp of perl, writing something like this would take rather more time than I have available.
I suggest you maybe look at the way the current search features work, and see if theres some way you can modify that to search for IPs in the way you've just described..
There are probably some people in the Perl forum who can help you out..
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.