Forum:InFamous Wiki Bot, help needed

The First Bot
Hey guys! I've taken on the assignment of creating the First Bot (War Clown, the crat, named her) for inFamous Wiki. Now, for starters I'm going to make it do the following: Not much, but it's something to start with. Now, the thing is, that while I'm experienced in programming, I have no idea how to set up a bot. I can't seem to find any decent guide or how-to, so I'm kind of stuck here. The only thing I found was a MediaWiki Bot for perl, and I ended up with this: use MediaWiki::Bot; my $bot = MediaWiki::Bot->new({ agent  => '$username',        assert      => 'bot',  operator => 'User:Alareiks',        protocol    => 'https',        host        => 'inFamous.wikia.com',        path        => 'wiki/meta/w',        login_data  => { username => "The First Bot", password => "5jkcrs" },    }); $bot->set_wiki({       protocol    => 'https',        host        => 'inFamous.wikia.com',        path        => 'wiki/meta/w',    });
 * 1) Give pages in the category the  template.
 * 2) Make McGrath be written as MacGrath

$bot->login({       username => $username,        password => $password,    }) or die "Login failed"; my @pages = $bot->get_pages_in_category('Category:inFamous'); print "$if"; $text = $bot->get_text('$if'); $text .= "\n\n* \n"; $bot->edit({       page    => '$if',        text    => $text,        summary => 'Adding Navbox',        section => 'new',    });

Now, as I've followed a template without having any former knowledge of the MediaWiki's commands, I'm going to need help with this. Kind of sre everything is completely wrong. Would appreciate some helps. It can be links to good resources or any personal help. Edit: I may take the time to note that the password I wrote is not the password I will use for the bot, but simply something random I came up with. Dear Wishes,  Alareiks  100% 13:35, July 1, 2011 (UTC)


 * I've got it fixed now. Alareiks   |   19:18, July 25, 2011 (UTC)