Sub in perl [ IRC ]


if ($svrmsg=~/all@!talk (.*)/)
{
$message=$1;
{if ($svrmsg=~/^\:$owner\!/){&talk;} # ส่งเข้า Sub
}
}
###### ใช้ Sub
sub talk{
print $connect "PRIVMSG ".$channel." :$message\r\n";
}

ที่มา : http://icheernoom.blogspot.com/2011/08/perl-sub-irc.html
โดย : ICheer_No0M

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.