Here try this plugin:
package autoid;
use warnings;
my $irc;
my $password = "pass1234"; # Change this to your bot's password.
BEGIN {
our $version = 1.0;
$irc = main::IRC;
$irc->add_handler('event connected','identify');
}
sub identify {
$irc->raw("PRIVMSG NickServ :identify $password");.