I do not program in that particular language, but this does not look right...
sub OnStats
should it not be something like...
sub OnStats(sName,sLine,wildcards)
then from the wildcards variable that is passed in you should derive the array...
but since you are not having the (sName,sLine,wildcards)
there you are basically denying the passing in of the matched values. So it IS matching, just NOT saying WHAT was matched.
I may just be talking out of my ass, as like I said I do not program in that language, I use LUA, and VBScript (Prefer LUA.... LUA ROCKS!!!)
Don't know Perl either, but I think your problem is in the fact that you call the on OnStats sub via send-to-scripting, without passing any arguments. Mushclient itself doesn't pass anything either, so since no arguments are passed - the args list is going to be empty.
I would look at the exampscript.pl file that ships with MUSHclient for examples of using the arguments in Perl.
For example:
sub OnStats
{
my ($strTriggerName, $trig_line, $wildcards) = @_;
$iHP = $world->GetTriggerInfo ($strTriggerName, 101);
$iMana = $world->GetTriggerInfo ($strTriggerName, 102);
$iMV = $world->GetTriggerInfo ($strTriggerName, 103);
$world->Note ("Your HP are $iHP");
$world->Note ("Your Mana is $iMana");
$world->Note ("Your movement points are $iMV");
} # end of OnStats
Note the first line in the sub which takes the @_ argument and converts it into the trigger name, matching line, and wildcards. Let me know if that doesn't work.
@_ is an entire array named _. To print an item in an array you must refer to it as a scalar, which is $_[0] or $_[1] etc. If you wanted to concatenate all members of the array together, use something like join(" ", @_).