I like using Net::IRC for Perl IRC bots, but this works as well. Never looked into use Socket, but good job on providing some variety around here. :)