Perl: Sorting an Array of Hashes

June 6th, 2008  |  by Adam Pope  |  1 Comment

I recently had a scenario where I had an array of hashes. Each hash represented a row of data for a table and I wanted to sort the whole array by the value of one element of the hash. As you’d expect, Perl has a very nice answer to the problem.

Perl: Print Internal Server Errors to the Browser

April 18th, 2008  |  by Adam Pope  |  No Comments

So, you’re a Perl programmer developing a CGI web application, chances are you’re going to make some mistakes and need to debug your code. By default, when a Perl program fails to compile or encounters a runtime error you will see your servers default HTTP 500 error message.

Scheduling a Process with Cron and Crontab

April 2nd, 2008  |  by Adam Pope  |  No Comments

Cron is a time-based scheduling service in Unix and Unix-like operating systems (including Linux, FreeBSD and Mac OS X). It makes use of a configuration table called crontab that gives details of the commands to run and the schedule to execute them. This guide covers the basics of using cron to setup cronjobs [...]

Perl: Generating a Random Number with Rand()

April 2nd, 2008  |  by Adam Pope  |  No Comments

Generating a psuedo random number is common programming task. This tutorial will show you how to this in Perl using the rand() function.

Archive of Related Entries with Movable Type

February 26th, 2008  |  by Adam Pope  |  No Comments

Recently, I have been working on a Movable Type based website for monthly research data. We found that we needed to create a sidebar module displaying monthly entries grouped by year. After some head scratching I came up with the following MT4 code.

Copyright © 2010 Storm Consultancy EU Ltd. All Rights Reserved.

Entries (RSS) | Comments (RSS)