Sending matched data to perl script?

Posted by Elshar on Sat 03 Mar 2007 06:16 AM — 1 posts, 8,647 views.

#0
<triggers
muclient_version="3.78"
world_file_version="15"
date_saved="2007-03-02 23:10:33"
>
<trigger
enabled="y"
match="^Characters found\: (?P&lt;whonum&gt;\d)$"
regexp="y"
script="who"
send_to="12"
sequence="101"
>
<send>%1</send>
</trigger>

Now, originally that match line was like this:
match="^Characters found\: (\d)$"

And my script file:
sub who
{
my ($strTriggerName, $trig_line, $wildcards) = @_;
$test = $world->GetTriggerInfo ($strTriggerName, 101);
$tget = $world->GetTriggerWildcard ("who", "whonum");

$world->tell("$test, $tget\n");

$world->tell("say I saw $test people online!\n");
$world->tell("\@: @_\n");
$world->tell("t: $trig_line\n");
$world->tell("w: $wildcards\n");
$world->tell("s: $strTriggerName\n");
$world->tell("wc $wildcards[0] \n");
$world->tell("t2: $test\n");
$world->tell("t3: $tget\n");

}


I'm really not sure how to get what I want. I just want to send the %1 from the trigger to the script, and then send it back to the world screen.