Perl script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • grants
    New Member
    • Jan 2008
    • 1

    #1

    Perl script

    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
  • KevinADC
    Recognized Expert Specialist
    • Jan 2007
    • 4092

    #2
    You really have not given anywhere enough information to offer much help. But here is how you save strings to scalars:

    Code:
    $foo = 'nick2';
    print $foo;

    Comment

    • savanm
      New Member
      • Oct 2006
      • 85

      #3
      Hi ...

      First try to show ur code.

      Explain the difficulty from the code.

      Then only possible to find ur problem

      Comment

      Working...