in reply to Problem with example UDP script from Perl Little Black Book

Instead of "peeraddr => localhost" you should use:

$socket = IO::Socket::INET->new(Proto => 'udp', PeerAddr => "localhost:4321");

That should work.