This is a contrived example. It uses POE::Filter::Line to parse lines from a handle read by sysread().

#!/usr/bin/perl -w

use strict;
use POE::Filter::Line;

my $filter = POE::Filter::Line->new();

open my $fh, "<", "/var/log/messages" or die $!;
while (sysread($fh, my $buffer = '', 1024)) {
  my $lines = $filter->get([$buffer]);
  foreach (@$lines) {
    print "got: $_\n";

Notes: Blocking sysread() input. Same can be done with $filter->put() and syswrite(). Be sure to remember get() and put() deal with list references, not lists. The filters' documentation should cover it.

This is more useful for some of the odder filters, like HTTPD and Reference, but it's also good if you want to roll your own select() or IO::Select loop. They also work with other event systems, for what that's worth.