Perl

Regular Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, PHP, Python, Ruby, etc)

"This is a tale of two approaches to regular expression matching. One of them is in widespread use in the standard interpreters for many languages, including Perl. The other is used only in a few places, notably most implementations of awk and grep. The two approaches have wildly different performance characteristics ..."
A very interesting article on regular expression matching algorithms.

Flash Media Server (FMS) monitoring with Munin

Munin is a great open source monitoring program available for a number of platforms. Flash Media Server (FMS) is a streaming server from Adobe aiming mainly at video playback in Flash applications (video players, video conference solutions, etc.). There was already a Munin plugin for FMS (monitoring the number of active connections) at MuninExchange, but the config parameters were hard-coded (in the plugin code) and it lacked documentation on usage and did not match the structure of standard Munin plugins. I've rewritten the plugin to come up for all these shortcomings. The new version of the plugin is available both attached to this post and at MuninExchange.

Lookahead and lookbehind assertions in Perl regular expressions

The tutorial at regular-expressions.info can help a lot in understanding these concepts, while the description at php.net is not really focusing on them.

Find and sort unique email addresses in a text file

The task is trivial, the solution not. Fortunately there's a Perl module written for exactly what we aim to do. It's called Email::Find and it can be installed through the libemail-find-perl package on Debian based systems.

Checking for existence of Perl packages

Eg. if you want to check for "Net::DNS", try this:
perl -e 'require Net::DNS'
You'll get an error like "Can't locate Net/DNS.pm in @INC..." if you don't have the given Perl package installed.

Installing and testing the Net::DNS Perl package on a Debian setup

All you need to do is to issue the following command:
apt-get install libnet-dns-perl

To test whether it works or not, try one of the demo scripts that come with libnet-dns-perl. In Debian they reside in the following location: /usr/share/doc/libnet-dns-perl/examples/demo/*

Syndicate content