...not 100% sure I've understood correctly what you're asking unfortunately...

If looking for a way to scan/validate misconfigured open proxies,
probably the best tool under Unix systems is YAPH,
it's written under Perl also,since you said so...
http://yaph.sourceforge.net/Under Windows platform,Charon is (was?) with difference,
the best proxy hunter tool I'm aware of...
http://www.project2025.com/charon.phpBut as said,I don't get exactly what you're trying to achieve...
is the goal say to restrict the users in your network,
from accessing specific malware links,even say via using proxies?
If that's the case...well,that's not easy at all...
as they could also bypass these kind of restrictions if they used Tor,
and also via say httptunnel,proxytunnel,ssh port-forwarding techniques...
more than a few ways to do the trick and upset/annoy the admin...

But we're entering a completely different area now,
far away from malware analysis...