#!/usr/bin/perl -w
# $Id: battles.pl,v 1.1.1.1 2008/10/12 04:05:34 alamos Exp $
use strict;

my %FamousBattles =
(
 'Battle of Heavenfield near Hexham' => ['634 AD',   'The Northumbrians versus the Welsh'],
 'Battle of Carham on Tweed'         => ['1016',     'The Northumbrians versus the Scots'],
 'Siege of Durham'                   => ['1069',     'The Northumbrians versus the Normans'],
 'Massacre of the Bishop, Gateshead' => ['1081',     'The Northumbrians versus the Normans'],
 'Battle at Alnwick'                 => ['1093',     'The English versus the Scots']
);

$FamousBattles{'Battle of Otterburn'} = ['1388',      'The English versus the Scots'];

my($key, $value);
print "--Events:\n";
foreach $key (keys(%FamousBattles)) {
    print $key, "\n";
}
print "--Dates:\n";
while (($key,$value)=each(%FamousBattles)) {
    print "$key happened in year $$value[0].\n";
}

