in reply to direct to multiple IP addresses

There's nothing wrong with your code. It's a limitation of HTTP. RFC 2616 indicates that you can only redirect to a single URI.

Jerry's reply to your original question offers the most practical solution. You can set a JavaScript timer, pop up multiple new windows, or set an onClose() handler to redirect to the next IP address.

There's just no way to do it in one shot with Perl on the server. It's not Perl's fault, it's not your fault. It's the way the process works.