Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    
    use strict;
    ...
    
        return \%towns;
    }
    
  2. or download this
    #!/usr/bin/env perl
    
    use strict;
    ...
    
        $self->{towns} = \%towns;
    }
    
  3. or download this
    my $us_towndb = TownDatabase->new(file => 'towns_usa.dat');
    my $eu_towndb = TownDatabase->new(file => 'towns_eu.dat');
    
  4. or download this
    #!/usr/bin/env perl
    
    use strict;
    ...
        }
        close $ifh;
    }
    
  5. or download this
    my $towndb = TownDatabase->new();
    foreach my $region (qw[eu us au]) {
        $towndb->loadFile($region . 'towns.dat');
    }