{
    "mode": "perldoc",
    "parameter": "Template::Manual::Filters",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Template%3A%3AManual%3A%3AFilters/json",
    "generated": "2026-06-10T04:32:52Z",
    "sections": {
        "NAME": {
            "content": "Template::Manual::Filters - Standard filters\n\nformat(format)\nThe \"format\" filter takes a format string as a parameter (as per \"printf()\") and formats each\nline of text accordingly.\n\n[% FILTER format('<!-- %-40s -->') %]\nThis is a block of text filtered\nthrough the above format.\n[% END %]\n\nOutput:\n\n<!-- This is a block of text filtered        -->\n<!-- through the above format.               -->\n\nupper\nFolds the input to UPPER CASE.\n\n[% \"hello world\" FILTER upper %]\n\nOutput:\n\nHELLO WORLD\n\nlower\nFolds the input to lower case.\n\n[% \"Hello World\" FILTER lower %]\n\nOutput:\n\nhello world\n\nucfirst\nFolds the first character of the input to UPPER CASE.\n\n[% \"hello\" FILTER ucfirst %]\n\nOutput:\n\nHello\n\nlcfirst\nFolds the first character of the input to lower case.\n\n[% \"HELLO\" FILTER lcfirst %]\n\nOutput:\n\nhELLO\n\ntrim\nTrims any leading or trailing whitespace from the input text. Particularly useful in conjunction\nwith \"INCLUDE\", \"PROCESS\", etc., having the same effect as the \"TRIM\" configuration option.\n\n[% INCLUDE myfile | trim %]\n\ncollapse\nCollapse any whitespace sequences in the input text into a single space. Leading and trailing\nwhitespace (which would be reduced to a single space) is removed, as per trim.\n\n[% FILTER collapse %]\n\nThe   cat\n\nsat    on\n\nthe   mat\n\n[% END %]\n\nOutput:\n\nThe cat sat on the mat\n\nhtml\nConverts the characters \"<\", \">\", \"&\" and \"\"\" to \"&lt;\", \"&gt;\", \"&amp;\", and \"&quot;\"\nrespectively, protecting them from being interpreted as representing HTML tags or entities.\n\n[% FILTER html %]\nBinary \"<=>\" returns -1, 0, or 1 depending on...\n[% END %]\n\nOutput:\n\nBinary \"&lt;=&gt;\" returns -1, 0, or 1 depending on...\n\nhtmlentity\nThe \"html\" filter is fast and simple but it doesn't encode the full range of HTML entities that\nyour text may contain. The \"htmlentity\" filter uses either the \"Apache::Util\" module (which is\nwritten in C and is therefore faster) or the \"HTML::Entities\" module (written in Perl but\nequally as comprehensive) to perform the encoding.\n\nIf one or other of these modules are installed on your system then the text will be encoded (via\nthe \"escapehtml()\" or \"encodeentities()\" subroutines respectively) to convert all extended\ncharacters into their appropriate HTML entities (e.g. converting '\"?\"' to '\"&eacute;\"'). If\nneither module is available on your system then an '\"htmlentity\"' exception will be thrown\nreporting an appropriate message.\n\nIf you want to force TT to use one of the above modules in preference to the other, then call\neither of the Template::Filters class methods: usehtmlentities() or useapacheutil().\n\nuse Template::Filters;\nTemplate::Filters->usehtmlentities;\n\nFor further information on HTML entity encoding, see\n<http://www.w3.org/TR/REC-html40/sgml/entities.html>.\n\nxml\nSame as the \"html\" filter, but adds \"&apos;\" which is the fifth XML built-in entity.\n\nhtmlpara\nThis filter formats a block of text into HTML paragraphs. A sequence of two or more newlines is\nused as the delimiter for paragraphs which are then wrapped in HTML \"<p>\"...\"</p>\" tags.\n\n[% FILTER htmlpara %]\nThe cat sat on the mat.\n\nMary had a little lamb.\n[% END %]\n\nOutput:\n\n<p>\nThe cat sat on the mat.\n</p>\n\n<p>\nMary had a little lamb.\n</p>\n\nhtmlbreak / htmlparabreak\nSimilar to the htmlpara filter described above, but uses the HTML tag sequence \"<br><br>\" to\njoin paragraphs.\n\n[% FILTER htmlbreak %]\nThe cat sat on the mat.\n\nMary had a little lamb.\n[% END %]\n\nOutput:\n\nThe cat sat on the mat.\n<br>\n<br>\nMary had a little lamb.\n\nhtmllinebreak\nThis filter replaces any newlines with \"<br>\" HTML tags, thus preserving the line breaks of the\noriginal text in the HTML output.\n\n[% FILTER htmllinebreak %]\nThe cat sat on the mat.\nMary had a little lamb.\n[% END %]\n\nOutput:\n\nThe cat sat on the mat.<br>\nMary had a little lamb.<br>\n\nuri\nThis filter URI escapes the input text, converting any characters outside of the permitted URI\ncharacter set (as defined by RFC 3986) into a %nn hex escape.\n\n[% 'my file.html' | uri %]\n\nOutput:\n\nmy%20file.html\n\nThe uri filter correctly encodes all reserved characters, including \"&\", \"@\", \"/\", \";\", \":\",\n\"=\", \"+\", \"?\" and \"$\". This filter is typically used to encode parameters in a URL that could\notherwise be interpreted as part of the URL. Here's an example:\n\n[% path  = 'http://tt2.org/example'\nback  = '/other?foo=bar&baz=bam'\ntitle = 'Earth: \"Mostly Harmless\"'\n%]\n<a href=\"[% path %]?back=[% back | uri %]&title=[% title | uri %]\">\n\nThe output generated is rather long so we'll show it split across two lines:\n\n<a href=\"http://tt2.org/example?back=%2Fother%3Ffoo%3Dbar%26\nbaz%3Dbam&title=Earth%3A%20%22Mostly%20Harmless%22\">\n\nWithout the uri filter the output would look like this (also split across two lines).\n\n<a href=\"http://tt2.org/example?back=/other?foo=bar\n&baz=bam&title=Earth: \"Mostly Harmless\"\">\n\nIn this rather contrived example we've manage to generate both a broken URL (the repeated \"?\" is\nnot allowed) and a broken HTML element (the href attribute is terminated by the first \"\"\" after\n\"Earth: \" leaving \"Mostly Harmless\"\" dangling on the end of the tag in precisely the way that\nharmless things shouldn't dangle). So don't do that. Always use the uri filter to encode your\nURL parameters.\n\nHowever, you should not use the uri filter to encode an entire URL.\n\n<a href=\"[% pageurl | uri %]\">   # WRONG!\n\nThis will incorrectly encode any reserved characters like \":\" and \"/\" and that's almost\ncertainly not what you want in this case. Instead you should use the url (note spelling) filter\nfor this purpose.\n\n<a href=\"[% pageurl | url %]\">   # CORRECT\n\nPlease note that this behaviour was changed in version 2.16 of the Template Toolkit. Prior to\nthat, the uri filter did not encode the reserved characters, making it technically incorrect\naccording to the RFC 2396 specification (since superceded by RFC2732 and RFC3986). So we fixed\nit in 2.16 and provided the url filter to implement the old behaviour of not encoding reserved\ncharacters.\n\nAs of version 2.26 of the Template Toolkit, the \"uri\" and url filters use the unsafe character\nset defined by RFC3986. This means that certain characters (\"(\", \")\", \"~\", \"*\", \"!\" and the\nsingle quote \"'\") are now deemed unsafe and will be escaped as hex character sequences. The\ndouble quote character ('\"') is now deemed safe and will not be escaped.\n\nIf you want to enable the old behaviour then call the \"userfc2732()\" method in\nTemplate::Filters\n\nuse Template::Filters\nTemplate::Filters->userfc2732;\n\nurl\nThe url filter is a less aggressive version of the uri filter. It encodes any characters outside\nof the permitted URI character set (as defined by RFC 2396) into %nn hex escapes. However,\nunlike the uri filter, the url filter does not encode the reserved characters \"&\", \"@\", \"/\",\n\";\", \":\", \"=\", \"+\", \"?\" and \"$\".\n\nindent(pad)\nIndents the text block by a fixed pad string or width. The '\"pad\"' argument can be specified as\na string, or as a numerical value to indicate a pad width (spaces). Defaults to 4 spaces if\nunspecified.\n\n[% FILTER indent('ME> ') %]\nblah blah blah\ncabbages, rhubard, onions\n[% END %]\n\nOutput:\n\nME> blah blah blah\nME> cabbages, rhubard, onions\n\ntruncate(length,dots)\nTruncates the text block to the length specified, or a default length of 32. Truncated text will\nbe terminated with '\"...\"' (i.e. the '\"...\"' falls inside the required length, rather than\nappending to it).\n\n[% FILTER truncate(21) %]\nI have much to say on this matter that has previously\nbeen said on more than one occasion.\n[% END %]\n\nOutput:\n\nI have much to say...\n\nIf you want to use something other than '\"...\"' you can pass that as a second argument.\n\n[% FILTER truncate(26, '&hellip;') %]\nI have much to say on this matter that has previously\nbeen said on more than one occasion.\n[% END %]\n\nOutput:\n\nI have much to say&hellip;\n\nrepeat(iterations)\nRepeats the text block for as many iterations as are specified (default: 1).\n\n[% FILTER repeat(3) %]\nWe want more beer and we want more beer,\n[% END %]\nWe are the more beer wanters!\n\nOutput:\n\nWe want more beer and we want more beer,\nWe want more beer and we want more beer,\nWe want more beer and we want more beer,\nWe are the more beer wanters!\n\nremove(string)\nSearches the input text for any occurrences of the specified string and removes them. A Perl\nregular expression may be specified as the search string.\n\n[% \"The  cat  sat  on  the  mat\" FILTER remove('\\s+') %]\n\nOutput:\n\nThecatsatonthemat\n\nreplace(search, replace)\nSimilar to the remove filter described above, but taking a second parameter which is used as a\nreplacement string for instances of the search string.\n\n[% \"The  cat  sat  on  the  mat\" | replace('\\s+', '') %]\n\nOutput:\n\nThecatsatonthemat\n\nredirect(file, options)\nThe \"redirect\" filter redirects the output of the block into a separate file, specified relative\nto the \"OUTPUTPATH\" configuration item.\n\n[% FOREACH user IN myorg.userlist %]\n[% FILTER redirect(\"users/${user.id}.html\") %]\n[% INCLUDE userinfo %]\n[% END %]\n[% END %]\n\nor more succinctly, using side-effect notation:\n\n[%  FOREACH user IN myorg.userlist;\nINCLUDE userinfo\nFILTER redirect(\"users/${user.id}.html\");\nEND\n%]\n\nA \"file\" exception will be thrown if the \"OUTPUTPATH\" option is undefined.\n\nAn optional \"binmode\" argument can follow the filename to explicitly set the output file to\nbinary mode.\n\n[% PROCESS my/png/generator\nFILTER redirect(\"images/logo.png\", binmode=1) %]\n\nFor backwards compatibility with earlier versions, a single true/false value can be used to set\nbinary mode.\n\n[% PROCESS my/png/generator\nFILTER redirect(\"images/logo.png\", 1) %]\n\nFor the sake of future compatibility and clarity, if nothing else, we would strongly recommend\nyou explicitly use the named \"binmode\" option as shown in the first example.\n\neval / evaltt\nThe \"eval\" filter evaluates the block as template text, processing any directives embedded\nwithin it. This allows template variables to contain template fragments, or for some method to\nbe provided for returning template fragments from an external source such as a database, which\ncan then be processed in the template as required.\n\nmy $vars  = {\nfragment => \"The cat sat on the [% place %]\",\n};\n$template->process($file, $vars);\n\nThe following example:\n\n[% fragment | eval %]\n\nis therefore equivalent to\n\nThe cat sat on the [% place %]\n\nThe \"evaltt\" filter is provided as an alias for \"eval\".\n\nperl / evalperl\nThe \"perl\" filter evaluates the block as Perl code. The \"EVALPERL\" option must be set to a true\nvalue or a \"perl\" exception will be thrown.\n\n[% myperlcode | perl %]\n\nIn most cases, the \"[% PERL %]\" ... \"[% END %]\" block should suffice for evaluating Perl code,\ngiven that template directives are processed before being evaluate as Perl. Thus, the previous\nexample could have been written in the more verbose form:\n\n[% PERL %]\n[% myperlcode %]\n[% END %]\n\nas well as\n\n[% FILTER perl %]\n[% myperlcode %]\n[% END %]\n\nThe \"evalperl\" filter is provided as an alias for \"perl\" for backwards compatibility.\n\nstdout(options)\nThe stdout filter prints the output generated by the enclosing block to \"STDOUT\". The \"binmode\"\noption can be passed as either a named parameter or a single argument to set \"STDOUT\" to binary\nmode (see the binmode perl function).\n\n[% PROCESS something/cool\nFILTER stdout(binmode=1) # recommended %]\n\n[% PROCESS something/cool\nFILTER stdout(1)         # alternate %]\n\nThe \"stdout\" filter can be used to force \"binmode\" on \"STDOUT\", or also inside \"redirect\",\n\"null\" or \"stderr\" blocks to make sure that particular output goes to \"STDOUT\". See the \"null\"\nfilter below for an example.\n\nstderr\nThe stderr filter prints the output generated by the enclosing block to \"STDERR\".\n\nnull\nThe \"null\" filter prints nothing. This is useful for plugins whose methods return values that\nyou don't want to appear in the output. Rather than assigning every plugin method call to a\ndummy variable to silence it, you can wrap the block in a null filter:\n\n[% FILTER null;\nUSE im = GD.Image(100,100);\nblack = im.colorAllocate(0,   0, 0);\nred   = im.colorAllocate(255,0,  0);\nblue  = im.colorAllocate(0,  0,  255);\nim.arc(50,50,95,75,0,360,blue);\nim.fill(50,50,red);\nim.png | stdout(1);\nEND;\n-%]\n\nNotice the use of the \"stdout\" filter to ensure that a particular expression generates output to\n\"STDOUT\" (in this case in binary mode).\n",
            "subsections": []
        }
    },
    "summary": "Template::Manual::Filters - Standard filters  format(format) The \"format\" filter takes a format string as a parameter (as per \"printf()\") and formats each line of text accordingly.  [% FILTER format('<!-- %-40s -->') %] This is a block of text filtered through the above format. [% END %]  Output:  <!-- This is a block of text filtered        --> <!-- through the above format.               -->  upper Folds the input to UPPER CASE.  [% \"hello world\" FILTER upper %]  Output:  HELLO WORLD  lower Folds the input to lower case.  [% \"Hello World\" FILTER lower %]  Output:  hello world  ucfirst Folds the first character of the input to UPPER CASE.  [% \"hello\" FILTER ucfirst %]  Output:  Hello  lcfirst Folds the first character of the input to lower case.  [% \"HELLO\" FILTER lcfirst %]  Output:  hELLO  trim Trims any leading or trailing whitespace from the input text. Particularly useful in conjunction with \"INCLUDE\", \"PROCESS\", etc., having the same effect as the \"TRIM\" configuration option.  [% INCLUDE myfile | trim %]  collapse Collapse any whitespace sequences in the input text into a single space. Leading and trailing whitespace (which would be reduced to a single space) is removed, as per trim.  [% FILTER collapse %]  The   cat  sat    on  the   mat  [% END %]  Output:  The cat sat on the mat  html Converts the characters \"<\", \">\", \"&\" and \"\"\" to \"&lt;\", \"&gt;\", \"&amp;\", and \"&quot;\" respectively, protecting them from being interpreted as representing HTML tags or entities.  [% FILTER html %] Binary \"<=>\" returns -1, 0, or 1 depending on... [% END %]  Output:  Binary \"&lt;=&gt;\" returns -1, 0, or 1 depending on...  htmlentity The \"html\" filter is fast and simple but it doesn't encode the full range of HTML entities that your text may contain. The \"htmlentity\" filter uses either the \"Apache::Util\" module (which is written in C and is therefore faster) or the \"HTML::Entities\" module (written in Perl but equally as comprehensive) to perform the encoding.  If one or other of these modules are installed on your system then the text will be encoded (via the \"escapehtml()\" or \"encodeentities()\" subroutines respectively) to convert all extended characters into their appropriate HTML entities (e.g. converting '\"?\"' to '\"&eacute;\"'). If neither module is available on your system then an '\"htmlentity\"' exception will be thrown reporting an appropriate message.  If you want to force TT to use one of the above modules in preference to the other, then call either of the Template::Filters class methods: usehtmlentities() or useapacheutil().  use Template::Filters; Template::Filters->usehtmlentities;  For further information on HTML entity encoding, see <http://www.w3.org/TR/REC-html40/sgml/entities.html>.  xml Same as the \"html\" filter, but adds \"&apos;\" which is the fifth XML built-in entity.  htmlpara This filter formats a block of text into HTML paragraphs. A sequence of two or more newlines is used as the delimiter for paragraphs which are then wrapped in HTML \"<p>\"...\"</p>\" tags.  [% FILTER htmlpara %] The cat sat on the mat.  Mary had a little lamb. [% END %]  Output:  <p> The cat sat on the mat. </p>  <p> Mary had a little lamb. </p>  htmlbreak / htmlparabreak Similar to the htmlpara filter described above, but uses the HTML tag sequence \"<br><br>\" to join paragraphs.  [% FILTER htmlbreak %] The cat sat on the mat.  Mary had a little lamb. [% END %]  Output:  The cat sat on the mat. <br> <br> Mary had a little lamb.  htmllinebreak This filter replaces any newlines with \"<br>\" HTML tags, thus preserving the line breaks of the original text in the HTML output.  [% FILTER htmllinebreak %] The cat sat on the mat. Mary had a little lamb. [% END %]  Output:  The cat sat on the mat.<br> Mary had a little lamb.<br>  uri This filter URI escapes the input text, converting any characters outside of the permitted URI character set (as defined by RFC 3986) into a %nn hex escape.  [% 'my file.html' | uri %]  Output:  my%20file.html  The uri filter correctly encodes all reserved characters, including \"&\", \"@\", \"/\", \";\", \":\", \"=\", \"+\", \"?\" and \"$\". This filter is typically used to encode parameters in a URL that could otherwise be interpreted as part of the URL. Here's an example:  [% path  = 'http://tt2.org/example' back  = '/other?foo=bar&baz=bam' title = 'Earth: \"Mostly Harmless\"' %] <a href=\"[% path %]?back=[% back | uri %]&title=[% title | uri %]\">  The output generated is rather long so we'll show it split across two lines:  <a href=\"http://tt2.org/example?back=%2Fother%3Ffoo%3Dbar%26 baz%3Dbam&title=Earth%3A%20%22Mostly%20Harmless%22\">  Without the uri filter the output would look like this (also split across two lines).  <a href=\"http://tt2.org/example?back=/other?foo=bar &baz=bam&title=Earth: \"Mostly Harmless\"\">  In this rather contrived example we've manage to generate both a broken URL (the repeated \"?\" is not allowed) and a broken HTML element (the href attribute is terminated by the first \"\"\" after \"Earth: \" leaving \"Mostly Harmless\"\" dangling on the end of the tag in precisely the way that harmless things shouldn't dangle). So don't do that. Always use the uri filter to encode your URL parameters.  However, you should not use the uri filter to encode an entire URL.  <a href=\"[% pageurl | uri %]\">   # WRONG!  This will incorrectly encode any reserved characters like \":\" and \"/\" and that's almost certainly not what you want in this case. Instead you should use the url (note spelling) filter for this purpose.  <a href=\"[% pageurl | url %]\">   # CORRECT  Please note that this behaviour was changed in version 2.16 of the Template Toolkit. Prior to that, the uri filter did not encode the reserved characters, making it technically incorrect according to the RFC 2396 specification (since superceded by RFC2732 and RFC3986). So we fixed it in 2.16 and provided the url filter to implement the old behaviour of not encoding reserved characters.  As of version 2.26 of the Template Toolkit, the \"uri\" and url filters use the unsafe character set defined by RFC3986. This means that certain characters (\"(\", \")\", \"~\", \"*\", \"!\" and the single quote \"'\") are now deemed unsafe and will be escaped as hex character sequences. The double quote character ('\"') is now deemed safe and will not be escaped.  If you want to enable the old behaviour then call the \"userfc2732()\" method in Template::Filters  use Template::Filters Template::Filters->userfc2732;  url The url filter is a less aggressive version of the uri filter. It encodes any characters outside of the permitted URI character set (as defined by RFC 2396) into %nn hex escapes. However, unlike the uri filter, the url filter does not encode the reserved characters \"&\", \"@\", \"/\", \";\", \":\", \"=\", \"+\", \"?\" and \"$\".  indent(pad) Indents the text block by a fixed pad string or width. The '\"pad\"' argument can be specified as a string, or as a numerical value to indicate a pad width (spaces). Defaults to 4 spaces if unspecified.  [% FILTER indent('ME> ') %] blah blah blah cabbages, rhubard, onions [% END %]  Output:  ME> blah blah blah ME> cabbages, rhubard, onions  truncate(length,dots) Truncates the text block to the length specified, or a default length of 32. Truncated text will be terminated with '\"...\"' (i.e. the '\"...\"' falls inside the required length, rather than appending to it).  [% FILTER truncate(21) %] I have much to say on this matter that has previously been said on more than one occasion. [% END %]  Output:  I have much to say...  If you want to use something other than '\"...\"' you can pass that as a second argument.  [% FILTER truncate(26, '&hellip;') %] I have much to say on this matter that has previously been said on more than one occasion. [% END %]  Output:  I have much to say&hellip;  repeat(iterations) Repeats the text block for as many iterations as are specified (default: 1).  [% FILTER repeat(3) %] We want more beer and we want more beer, [% END %] We are the more beer wanters!  Output:  We want more beer and we want more beer, We want more beer and we want more beer, We want more beer and we want more beer, We are the more beer wanters!  remove(string) Searches the input text for any occurrences of the specified string and removes them. A Perl regular expression may be specified as the search string.  [% \"The  cat  sat  on  the  mat\" FILTER remove('\\s+') %]  Output:  Thecatsatonthemat  replace(search, replace) Similar to the remove filter described above, but taking a second parameter which is used as a replacement string for instances of the search string.  [% \"The  cat  sat  on  the  mat\" | replace('\\s+', '') %]  Output:  Thecatsatonthemat  redirect(file, options) The \"redirect\" filter redirects the output of the block into a separate file, specified relative to the \"OUTPUTPATH\" configuration item.  [% FOREACH user IN myorg.userlist %] [% FILTER redirect(\"users/${user.id}.html\") %] [% INCLUDE userinfo %] [% END %] [% END %]  or more succinctly, using side-effect notation:  [%  FOREACH user IN myorg.userlist; INCLUDE userinfo FILTER redirect(\"users/${user.id}.html\"); END %]  A \"file\" exception will be thrown if the \"OUTPUTPATH\" option is undefined.  An optional \"binmode\" argument can follow the filename to explicitly set the output file to binary mode.  [% PROCESS my/png/generator FILTER redirect(\"images/logo.png\", binmode=1) %]  For backwards compatibility with earlier versions, a single true/false value can be used to set binary mode.  [% PROCESS my/png/generator FILTER redirect(\"images/logo.png\", 1) %]  For the sake of future compatibility and clarity, if nothing else, we would strongly recommend you explicitly use the named \"binmode\" option as shown in the first example.  eval / evaltt The \"eval\" filter evaluates the block as template text, processing any directives embedded within it. This allows template variables to contain template fragments, or for some method to be provided for returning template fragments from an external source such as a database, which can then be processed in the template as required.  my $vars  = { fragment => \"The cat sat on the [% place %]\", }; $template->process($file, $vars);  The following example:  [% fragment | eval %]  is therefore equivalent to  The cat sat on the [% place %]  The \"evaltt\" filter is provided as an alias for \"eval\".  perl / evalperl The \"perl\" filter evaluates the block as Perl code. The \"EVALPERL\" option must be set to a true value or a \"perl\" exception will be thrown.  [% myperlcode | perl %]  In most cases, the \"[% PERL %]\" ... \"[% END %]\" block should suffice for evaluating Perl code, given that template directives are processed before being evaluate as Perl. Thus, the previous example could have been written in the more verbose form:  [% PERL %] [% myperlcode %] [% END %]  as well as  [% FILTER perl %] [% myperlcode %] [% END %]  The \"evalperl\" filter is provided as an alias for \"perl\" for backwards compatibility.  stdout(options) The stdout filter prints the output generated by the enclosing block to \"STDOUT\". The \"binmode\" option can be passed as either a named parameter or a single argument to set \"STDOUT\" to binary mode (see the binmode perl function).  [% PROCESS something/cool FILTER stdout(binmode=1) # recommended %]  [% PROCESS something/cool FILTER stdout(1)         # alternate %]  The \"stdout\" filter can be used to force \"binmode\" on \"STDOUT\", or also inside \"redirect\", \"null\" or \"stderr\" blocks to make sure that particular output goes to \"STDOUT\". See the \"null\" filter below for an example.  stderr The stderr filter prints the output generated by the enclosing block to \"STDERR\".  null The \"null\" filter prints nothing. This is useful for plugins whose methods return values that you don't want to appear in the output. Rather than assigning every plugin method call to a dummy variable to silence it, you can wrap the block in a null filter:  [% FILTER null; USE im = GD.Image(100,100); black = im.colorAllocate(0,   0, 0); red   = im.colorAllocate(255,0,  0); blue  = im.colorAllocate(0,  0,  255); im.arc(50,50,95,75,0,360,blue); im.fill(50,50,red); im.png | stdout(1); END; -%]  Notice the use of the \"stdout\" filter to ensure that a particular expression generates output to \"STDOUT\" (in this case in binary mode).",
    "flags": [],
    "examples": [],
    "see_also": []
}