Your code lacks:
use strict; use warnings; [download]
Read:
Also, you've ignored the advice on formating your post.
In reply to Re: Using sockaddr_in6 (bind) by marto in thread Using sockaddr_in6 (bind) by saru