- or download this
package Filter::Handle;
use strict;
...
}
1;
- or download this
my $f = Filter::Handle->new(\*STDOUT,
sub { "Foo: @_\n" });
print "Bar";
- or download this
use Filter::Handle qw/subs/;
Filter \*STDOUT, sub { "Foo: @_\n" };
print "Bar";
UnFilter \*STDOUT;