Archive for Perl

Perl - CGI and Fork

I recently had the need to fork a child process from within a CGI application. After a few searches I came up with the following basic syntax which is based on a an article by Randal Schwartz.

# Forking a new child process to handle the ping attempts without the wait defined(my $childpid = fork) or eval{$self->_set_error('Could not fork ping processes.'); return; }; if ($childpid) { # Parent process exits return; } else { # Child process runs it's course Child process execution here.... exit; }

Comments

Perl Article Resources

During a recent search I found some great perl article resources. Of course, they’ve always been there I just never bothered to catalogue them.

<

p> Read the rest of this entry »

Comments

Perl - Syntax Highlighting

I’ve been searching for a way to highlight various language syntaxes in html via the YawpCast tool.

Fortunately, I stumbled across the Colorer Library Project which supports over 100 languages and is written in c++ and xml.

There is also a Perl wrapper ( Syntax::Highlight::Universal ) for it.On a side note, php users can use the GeSHi project to do the same thing.

Comments