When defining SQL procedures and functions referencing Perl objects, the LANGUAGE is always PERL and the EXTERNAL NAME string contains the information needed to call the Perl subroutines and to return OUT parameters and return values.
In this example, the Perl object PerlConsoleExample creates the string 'Hello world'. This SQL procedure writes the output of PerlConsoleExample to the database server messages window:
CREATE PROCEDURE PerlWriteToConsole( IN str LONG VARCHAR) EXTERNAL NAME '<file=PerlConsoleExample> WriteToServerConsole( $sa_perl_arg0 )' LANGUAGE PERL; // 'Hello world' should appear in the database server messages window CALL PerlWriteToConsole( 'Hello world' );