Geography::USStates

Geography::USStates is a Perl module that allows you to get information on US State names.
Download

Geography::USStates Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Dion Almaer
  • Publisher web site:
  • http://search.cpan.org/~dionalm/Geography-USStates-0.12/USStates.pm

Geography::USStates Tags


Geography::USStates Description

Geography::USStates is a Perl module that allows you to get information on US State names. Geography::USStates is a Perl module that allows you to get information on US State names, their abbreviations, and couple the two together (in hashes).SYNOPSISuse Geography::USStates; # -- just getState* functions use Geography::USStates qw(:areas); # -- just getArea* functions use Geography::USStates qw(:both); # -- just getState*Area* functions use Geography::USStates qw(:both); # -- all functions# ------ US STATES BASED $state = getState('mn'); # -- get the statename 'Minnesota'$state = getState('wisconsin'); # -- get the abbreviation 'wi'@states = getStateNames(); # -- return all state names@states = getStateAbbrevs(); # -- return all state abbrevations (AL, AK, ..)%s = getStates(); # -- return hash $states{'MN'} = 'Minnesota'%s = getStates(case=>'upper'); # -- return hash $states{'MN'} = 'MINNESOTA'%s = getStates(case=>'lower'); # -- return hash $states{'MN'} = 'minnesota'%s = getStates(hashkey=>'name');# -- return hash $states{'Minnesota'} = 'MN'# ------ US AREAS $area = getArea('gu'); # -- get the area name 'Guam'$area = getArea('guam'); # -- get the abbreviation 'gu'@areas = getAreaNames(); # -- return all area names@areas = getAreaAbbrevs(); # -- return all area abbrevations (DC, GU, ..)%a = getAreas(); # -- return hash $states{'GU'} = 'Guam'%a = getAreas(case=>'upper'); # -- return hash $states{'GU'} = 'GUAM'%a = getAreas(case=>'lower'); # -- return hash $states{'GU'} = 'guam'%a = getAreas(hashkey=>'name'); # -- return hash $states{'Guam'} = 'GU'# ------ Lookup both US States and Dependant areas # -- get the statename 'Minnesota' or 'Guam' respectivily $state = getStateOrArea('mn' || 'gu');# -- get the abbreviation 'wi' or 'gu' respectivily $state = getStateOrArea('wisconsin' || 'guam');# -- return all states and areas names together @states = getStatesAndAreasNames();# -- return all states and areas abbreviations together @states = getStatesAndAreasAbbrevs();# -- same as getStates() but it returns the areas in the hash too %s = getStatesAndAreas(); %s = getStatesAndAreas(case=>'upper'); %s = getStatesAndAreas(case=>'lower'); %s = getStatesAndAreas(hashkey=>'name'); Requirements: · Perl


Geography::USStates Related Software