Perl Monks level bumped

It’s been a while since I hanged out at Perl Monks. Today I followed some link and ended up reading a couple of articles there. I decided to check my status and discovered that I only needed 9 points to achieve the next level – pontiff. 30 daily votes were available, so I voted here and there and gained the points.

Now I am a Pontiff and need 700 points to step up to the top of the ladder – Saint.

Working with named pipes in Perl

The collegue of mine came across a problem that developed into an interesting solution that I decided to share with the world. Actually, I think the world is pretty much aware of the solution, but just in case that I will ever be looking for this solution again, I’ll have it handy here.

The task at hand was to do some processing of the logs on the fly. The syslog was configured to filter the appropriate logs into a named pipe and a Perl script was written to read from the said pipe and do all the processing.

The original piece of code looked something like this:

open (SYSLOG, "<$named_pipe") 
  or die "Couldn't open $named_pipe: $!\n";

while () {
  do_processing($_);
}

close(SYSLOG);

The problem came with syslog daemon restarts. Every time the syslog was stopped, the EOF was sent to the pipe and the script stopped reading it.

Continue reading Working with named pipes in Perl

Daily del.icio.us bookmarks

Shared bookmarks for del.icio.us user tvset on 2005-09-06

Daily del.icio.us bookmarks

I’ve been rather silent in bookmark department over the last few days. For today though, I’ll give a you long list.

Firstly, a few sites about parenting. There are some funny and cool bits too, so even if you don’t have any kids, you might want to check them out.

Continue reading Daily del.icio.us bookmarks

Daily del.icio.us bookmarks

I came across a couple of really good programming resources. The first one has an excellent collection of links to websites and articles about designing good user interfaces and improving accessibility. The second one is a great article about commenting source code. It also links to some nice works on the subject.

These were shared bookmarks for del.icio.us user tvset on 2005-08-31.