%PERL{"perl expression"}%

  • Expands to the result of the perl expression, evaluated in a Safe container.
%PERL{topic="topic name"}%
  • Expands to the result of the perl program contained between %CODE{}% and %ENDCODE% in the named topic.
  • You can only use a subset of perl, as defined in the Foswiki configuration.

Examples

If the plugin is installed, the text after 'expands to' will show the result of the example.
  • %PERL{"'A String'"}% expands to %PERL{"'A String'"}%
  • %PERL{"101 - 59"}% expands to %PERL{"101 - 59"}%
  • %PERL{topic="System.VarPERL"}% expands to %PERL{topic="VarPERL"}%

Perl code used for this example:
%CODE{"perl"}%
my $x = 99;
$x = $x + 1;
return $x;
%ENDCODE%
Topic revision: r2 - 11 Nov 2010, PadraigLennon - This page was cached on 18 Dec 2018 - 10:13.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy