in reply to simple DHCP server in Perl

In your send_offer, you provide a hardcoded IP peer address of 255.255.255.255, which, correctly, maps to an ethernet address of ff:ff:ff:ff:ff:ff.

When you receive the discovery message, you need to get the sender's ethernet address then provide that.