Although many linux distributions are preconfigured for various locales, they may need further user customization to support the desired features.


Although java.lang.Object declares and implements a method finalize() which is meant to be called by the garbage collector to allow the object to gain control one last time to free resources and finish sanely, I found out in a rather painful way that finalize() will only be called by the garbage collector and not when exiting the program. This means that all the objects that have been in use shortly before shutdown of the virtual machine do not get the chance to close sanely.

Escaping URLs

To ensure that URLs can be displayed regardless of the locale, special characters are substituted by a percent sign followed by their two digit hexadecimal equivalent.

Documenting Perl Regular Expressions

Regular expressions can easily be documented which is demonstrated in the following example matching floating point numbers:

XML Parser

In one of my projects I needed to process XML files with document type definitions (DTD). The first couple of attempt failed miserably. But after some research I managed to cope:

Special Analysis

In addition to the commonly known properties of a statistic, a special analysis of the data can be performed based on the type of the individual values:

Slurp Mode

The internal variable INPUT_RECORD_SEPARATOR determines which string of characters closes a line of input data.

Avoiding Perl Regular Expressions

Although regular expressions are a complex but extremely useful tool for the analysis of strings, they are based on fuzzy logic and, therefore, have high computational demands. Although there can be no universal statement, some rules of thumb can be compiled to support a case-to-case decision whether simple string analysis based on index(), substr(), chr() and ord() is able to improve the time complexity of a perl script with respect to regular expressions.

XFree Message Windows

The xmessage that comes with Xorg (or XFree) displays a customizable message box. Although its set of features is extended by the gxmessage command, the following listing applies to both command:

What the heck is pack?

The internal commands pack and unpack have been the source of much confusion, therefore, I will shortly present typical scenarios when to use pack and unpack.