469,295 Members | 1,984 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,295 developers. It's quick & easy.

Perl script

1
Hi, im totally new to perl and started to write a little script for irssi. All i want to do first is when someone on a irc channel writes "!sometext nick", the "scriptbot" gives out a text line something like this: "blablabla-nick". I have done this far:

elsif ($text =~ /^!blabla$/i ) {
$server->command ( "msg $target texttexttext-$nick" );

Example: <nick1> !blabla
<bot> texttexttext-nick1

and it works. But now i want it like this:
Example: <nick1> !blabla nick2
<bot> texttexttext-nick2

I cant seem to get the nick2 saved in a variable to begin with, please help.

/Peter
Jan 23 '08 #1
2 1084
KevinADC
4,059 Expert 2GB
You really have not given anywhere enough information to offer much help. But here is how you save strings to scalars:

Expand|Select|Wrap|Line Numbers
  1. $foo = 'nick2';
  2. print $foo;
  3.  
Jan 23 '08 #2
savanm
85
Hi ...

First try to show ur code.

Explain the difficulty from the code.

Then only possible to find ur problem
Jan 24 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by sam | last post: by
1 post views Thread by Julia Bell | last post: by
9 posts views Thread by Martin Foster | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.