use threads; use Log::log4perl qw(get_logger); use File::Tail; use My::Object; my $tail = File::Tail->new('file.log'); while( defined( my $line = $tail->read ) ) { next if $line =~ m/^#|^\s*$/; my $obj = My::Object->new($line); my $th = threads->create( foo, $obj ); my $rc = $th->join; $logger->warn("Problem") if $rc; next; } sub foo { (shift)->bar; } __END__ # taking the next; in the while doesn't work, either...