The challenge was to write a DNS server in a couple of lines of Perl. The spec was that it needed to return the same IP address for all requests, so that we could use it to see if viruses were trying to connect to the internet. Simpler solutions might have been to install ZoneAlarm on the machine to test for things like that, but a virus might detect that...
Anyway, the new version of Net::DNS (0.19) allowed me to do it in 3 lines (damnit!):
Net::DNS::Nameserver->new( ReplyHandler => sub { return ("NOERROR", [Net::DNS::RR->new("$_[0] 3600 $_[1] A 10.2.1.150")],[],[])if$_[2]eq"A"; return ("NXDOMAIN", [], [], []) })->main_loop; use Net::DNS 0.19;