Created
August 1, 2012 07:18
-
-
Save delonnewman/3224461 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my %ADDRESSES = ( | |
G => '92-1171 Palahia St', | |
H => '92-1167 Palahia St', | |
J => '92-1179 Palahia St', | |
K => '92-1183 Palahia St', | |
L => '92-1185 Palahia St' | |
); | |
my %UNITS = ( | |
G => [101..106, 201..206], | |
H => [101..106, 201..206], | |
J => [101..106, 201..206], | |
K => [101..104, 201..204], | |
L => [101..106, 201..206], | |
); | |
sub get_addresses { | |
map { | |
my ($bld, $memo) = @$_; | |
map { "$memo, Unit $_" } @{$UNITS{$bld}}; | |
} | |
map { [ $_, "$ADDRESSES{$_}, Bldg $_" ] } keys %ADDRESSES; | |
} | |
print "Address Line 1,City,State,Zip\n"; | |
print "$_\n" for map { "\"$_\",Kapolei,HI,96707" } get_addresses(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment