The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<!doctype html public "-//W30//DTD W3 HTML 2.0//EN">

<HTML>

<!-- This file was generated using SDF 2.001 by
     Ian Clatworthy (ianc@mincom.com). SDF is freely
     available from http://www.mincom.com/mtr/sdf. -->

<HEAD>
<TITLE>SDF 2.001: SDF Reference: simple Filter</TITLE>
</HEAD>
<BODY BGCOLOR="ffffff">

<DIV CLASS="header">
<P><IMG SRC="../sdflogo.gif" ALIGN="Right"></P>
<DIV CLASS="navigate">
<P ALIGN="Center"><A HREF="re_sdf.html">Contents</A> | <A HREF="in_filt.html">Parent Topic</A> | <A HREF="fsection.html">Previous Topic</A> | <A HREF="ftable.html">Next Topic</A> <BR><A HREF="../index.html">Home</A> | <A HREF="../catalog.html">Catalog</A></P>
</DIV>
<BR CLEAR="Right">
</DIV>
<DIV CLASS="main">
<H1>5.30. simple Filter</H1>
<HR>
<H2><A NAME="Interface">Interface</A></H2>
<PRE>
!block <B>simple</B> [;<EM>parameters</EM>]
...
!endblock
</PRE>
<P>The parameters are:</P>
<TABLE CLASS="columns" BORDER>
<TR CLASS="heading">
<TD>
<STRONG>Name</STRONG>
</TD>
<TD>
<STRONG>Description</STRONG>
</TD>
</TR>
<TR>
<TD>
pre
</TD>
<TD>
Perl code to execute before the block
</TD>
</TR>
<TR>
<TD>
exec
</TD>
<TD>
executed for each line with $line containing the text line
</TD>
</TR>
<TR>
<TD>
post
</TD>
<TD>
Perl code to execute after the block
</TD>
</TR>
</TABLE>

<HR>
<H2><A NAME="Description">Description</A></H2>
<P>The <EM>simple</EM> filter is typically used as a building block for other filters. It provides a simple way of specifying the before (pre), per-line (exec) and after (post) actions.</P>
<P><HR WIDTH="80%" ALIGN="Left">
<STRONG>Note: </STRONG>As creating new filters is not something that the average SDF users does, this filter is really provided to make life easier for advanced SDF users and SDF administrators.
<HR WIDTH="80%" ALIGN="Left"></P>
<HR>
<H2><A NAME="Examples">Examples</A></H2>
<PRE>
!on filter &quot;testcases&quot;;; \
        $name='simple'; \
        $params.=';pre=&quot;!testcaseStart&quot;'; \
        $params.=';post=&quot;!testcaseEnd&quot;'
</PRE>
</DIV>
<DIV CLASS="footer">
<DIV CLASS="navigate">
<P ALIGN="Center"><A HREF="re_sdf.html">Contents</A> | <A HREF="in_filt.html">Parent Topic</A> | <A HREF="fsection.html">Previous Topic</A> | <A HREF="ftable.html">Next Topic</A> <BR><A HREF="../index.html">Home</A> | <A HREF="../catalog.html">Catalog</A></P>
</DIV>
</DIV>

</BODY>
</HTML>