Skip to end of metadata
Go to start of metadata


validation of Danish postal/zip codes

Latest Blog Posts

Blog Posts


Wiki formatted editions of the POD documentation is hosted here.


Monitoring the Data Source

In order to keep my script up to date with the original data source I have implemented a basic script to check the checksum of the file from where I get the data.

PostDanmark Monitor

use strict;
use warnings;
use LWP::UserAgent;
use Digest::MD5;
#digest computed 2012.04.11
use constant DIGEST => '11d46cee24739c361171f31444428e95';
my $url = '';
my $ua = LWP::UserAgent->new;
my $response = $ua->get($url);
if ($response->is_success) {
    my $content = $response->decoded_content;
    my $ctx = Digest::MD5->new;
	my $digest = $ctx->hexdigest;
	if ($digest ne DIGEST) {
		die "Digest $digest differs from ".DIGEST." - check URL: $url\n";
	} else {
		print "Nothing new under the sun for: $url\n";
else {
    die $response->status_line;

Download the application


See Also