sub on_msg { my ($self, $event) = @_; # $event contains all the interesting information, # for example $event->nick and $event->args $self->privmsg($event->nick, "You said " $event->args); }