perl.begin

Starts a perl code snippet
Syntax

perl.begin [-n] [-q] [(<perl_context>[,<arg0>[,<arg1>[...]]])]
<perl code>
perl.end

Description
Indicates the beginning of a snipped of perl code. The whole code part between perl.begin and perl.end is executed in a perl interpreter. If perl.end is omitted then it is implicitly assumed that the code from perl.begin to the end of the command buffer is perl.
Each perl code execution is bound to a perl context (that is in fact a particular instance of a perl interpreter). If <perl_context> is not specified or it is an empty string then temporary perl interpreter is created and destroyed just after the code snippet has terminated execution. If <perl_context> is specified then a perl interpreter keyed to that context is used: if it was already existing then it is reused otherwise it is created. Any <perl_context> is persistent: it mantains the function declarations and perl variable states until explicitly destroyed with perl.destroy (or the perlcore module is forcibly unloaded).
The <arg0>,<arg1>,... arguments, if present, are passed to the perl code snippet in the @_ array (accessible as $_[0],$_[1]...).
The return value of the perl code is propagated to the current context (just like setreturn was called on it) unless the -n switch is used.
The -q switch prevents from the command from printing any warning.
See the perl scripting documentation for more information.
Switches
-q
Prevents the command from printing any warnings.
-n
Prevents the perl script return value to be propagated to the current context.
Examples
    perl.begin
    KVIrc::eval("echo \"Hello World from perl!\"");
    perl.end

Index, Commands
KVIrc 3.2.0 Documentation
Generated by kris at Sun Dec 2 00:00:57 2007