Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Nov 2002 16:07:56 -0600
From:      Chris Pressey <cpressey@catseye.mb.ca>
To:        Scott Pilz <tech@tznet.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Syslog Piping
Message-ID:  <20021119160756.0f25b6e8.cpressey@catseye.mb.ca>
In-Reply-To: <20021119153526.M30438-100000@mail.tznet.com>
References:  <20021119153526.M30438-100000@mail.tznet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 19 Nov 2002 15:39:24 -0600 (CST)
Scott Pilz <tech@tznet.com> wrote:

> 
> 	In syslog, if you have:
> 
> *.*			| /pipe.pl
> 
> The output should be piped to pipe.pl - how, in perl, would you go about
> capturing this output? I have tried everything I could think of. $1,
> ARGV[#], STDIN, while (<>) (which apparently works on linux, I haven't
> tried myself), and then some.
> 
> 	Anybody ever try this?
> 
> 	Thanks,
> 
> 	Scott

IIRC you might need to put

  $| = 1;

at the beginning of the Perl script, so that STDIN is automatically
flushed.

-Chris

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021119160756.0f25b6e8.cpressey>