Re: perl like tail -f

2009-10-22 Thread Harry Putnam
Shawn H Corey writes: >> open(FILE,"<./named-pipe") or die "Can't Open ./named-pipe: $!"; >> while(){ >> print; >> if(eof){ >> sleep 2; >> seek (FILE,0,1); >> } >> } >> >> It seems at least to survive repeated restarts of system logger. >> >> If I write my script

Re: perl like tail -f

2009-10-20 Thread Peter Scott
On Mon, 19 Oct 2009 23:30:30 -0500, Harry Putnam wrote: > Shawn H Corey writes: > >> http://search.cpan.org/~mgrabnar/File-Tail-0.99.3/Tail.pm > > Thanks that looks useful. Is there a reason why I should use that > module as apposed to the kind of code offered in the faq about tail? > (perldoc

Re: perl like tail -f

2009-10-20 Thread Shawn H Corey
Harry Putnam wrote: > Shawn H Corey writes: > >> http://search.cpan.org/~mgrabnar/File-Tail-0.99.3/Tail.pm > > Thanks that looks useful. Is there a reason why I should use that > module as apposed to the kind of code offered in the faq about > tail? (perldoc -q tail) as suggested by another p

Re: perl like tail -f

2009-10-19 Thread Harry Putnam
Shawn H Corey writes: > http://search.cpan.org/~mgrabnar/File-Tail-0.99.3/Tail.pm Thanks that looks useful. Is there a reason why I should use that module as apposed to the kind of code offered in the faq about tail? (perldoc -q tail) as suggested by another poster (Jim G). I mean, I'm not e

Re: perl like tail -f

2009-10-19 Thread Harry Putnam
Jim Gibson writes: > On 10/19/09 Mon Oct 19, 2009 11:38 AM, "Harry Putnam" > scribbled: > > >> >> I'm not sure what it is about the tail -f command that allows it to >> keep reading over restarts of system logger (on Opensolaris)... but >> how can I emulate whatever it is.. in perl? >> > > T

Re: perl like tail -f

2009-10-19 Thread Jim Gibson
On 10/19/09 Mon Oct 19, 2009 11:38 AM, "Harry Putnam" scribbled: > > I'm not sure what it is about the tail -f command that allows it to > keep reading over restarts of system logger (on Opensolaris)... but > how can I emulate whatever it is.. in perl? > There is an FAQ: perldoc -q tai

Re: perl like tail -f

2009-10-19 Thread Shawn H Corey
Harry Putnam wrote: > I'm not sure what it is about the tail -f command that allows it to > keep reading over restarts of system logger (on Opensolaris)... but > how can I emulate whatever it is.. in perl? Have you looked at File::Tail http://search.cpan.org/~mgrabnar/File-Tail-0.99.3/Tail.pm ?

perl like tail -f

2009-10-19 Thread Harry Putnam
With a linux background I'm used to being able to my the system logger right to a named pipe buy means of a `|' (pipe) symbol in syslog.conf *.* |/var/log/fifo But on Opensolaris the system logger is enough different than the sysklogd daemon on linux that the `|' sy