sub on_public { my ( $self, $event ) = @_; my ( $nick, $mynick ) = ( $event->nick, $self->nick ); my ($channel) = ( $event->to )[0]; my ($line) = ( $event->args ); my ($arg) = ( $event->args ); $arg =~ /^(\S+)\s*(.*)$/; ( $arg, my $extarg ) = ( $1, $2 ); if ( $line =~ /^!schreibwas/ ){ output('blablub'); } }