in reply to mod_perl and semi-dynamic data

  and reading it from file every execution seems silly

Perl is quite good at loading small files into internal structures quickly. Just a few lines of code and that's it. (And the performance penalty for reading it from file is minimal because the files are small and simple.)

use strict; use Data::Dumper; chomp(my @data = <DATA>); my %states = map { my ($p,$c,$s) = split /\|/; $p => [ $c, $s ] } @data; print Dumper(\%states); __DATA__ 3000|Melbourne|VIC 2000|Sydney|NSW
and the output is
$VAR1 = { '3000' => [ 'Melbourne', 'VIC' ], '2000' => [ 'Sydney', 'NSW' ] };