#!/usr/bin/perl use strict; use warnings; package IDBot; use base qw(Bot::BasicBot); sub said { my $self = shift; my $arguments = shift; if ($arguments->{who} =~ /^yournick$/) { return "You're the boss!"; } else { return "I don't recognize you!"; } } package main; my $bot = IDBot->new( server => 'irc.example.com', port => '6667', channels => ['#perl101'], nick => 'nickname', name => 'username', ); $bot->run();