Archive for April, 2005

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

Photoshop Tutorials

I’ve been looking into building interfaces for some game ideas lately. Links to some decent tutorial sites follows.

Comments

XHTML Transition Tips

As I’ve undergone the transition from HTML to XHTML I’ve collected various bits of information that I found useful. The following items provide an overview of the some of the more nagging issues that came up.

Anchor - target=”" attribute

Since the target=”" attribute is not valid in strict XHTML 1.0, the following allows the target to be used with a minimum of JavaScript.

The onclick=”" atttribute is valid XHTML. For those users with Javascript turned off, the link simply loads in the same frame.

<a xhref=”http://www.site.com/path_to_page.html” mce_href=”http://www.site.com/path_to_page.html” onclick=”target=’_blank’”>My Link<a>

TD - nowrap attribute

nowrap is not XHTML compliant since it doesn’t have the required quotes. However, transitionally it is legal to put nowrap=”nowrap”.

For a purer version use the style=”white-space:nowrap” css mark-up. Or, put it in an external stylesheet.

IMG - align=”" attribute

Since the align attribute is not valid in XHTML 1.0 we need to find the css equivalents. Instead of one css equivalent, however, there are a couple to consider. For horizontal aligning, use the “float” attribute. For vertical alignment use the “vertical-align” attribute.

Valid _float_ values: float:left or float:right

Valid _vertical-align_ values: top, bottom, middle, text-top, text-bottom, baseline.

Comments