line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Business::OnlinePayment::PPIPayMover::CountryCodes;
|
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
35
|
use strict;
|
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
239
|
|
4
|
6
|
|
|
6
|
|
31
|
use vars qw(@ISA @EXPORT %countryHash);
|
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
403
|
|
5
|
6
|
|
|
6
|
|
30
|
use Exporter;
|
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
6226
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
@ISA = qw(Exporter);
|
8
|
|
|
|
|
|
|
@EXPORT = qw(getCountry
|
9
|
|
|
|
|
|
|
getNumericCountryCode
|
10
|
|
|
|
|
|
|
isValidCountryCode
|
11
|
|
|
|
|
|
|
getCCodeFromCName);
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# Two Character Country Codes */
|
14
|
|
|
|
|
|
|
%countryHash = ("DZ" => "ALGERIA:012",
|
15
|
|
|
|
|
|
|
"BJ" => "BENIN:204",
|
16
|
|
|
|
|
|
|
"BW" => "BOTSWANA:072",
|
17
|
|
|
|
|
|
|
"BF" => "BURKINA FASO:854",
|
18
|
|
|
|
|
|
|
"BI" => "BURUNDI:108",
|
19
|
|
|
|
|
|
|
"CM" => "CAMEROON:120",
|
20
|
|
|
|
|
|
|
"CV" => "CAPE VERDE:132",
|
21
|
|
|
|
|
|
|
"CF" => "CENTRAL AFRICAN REPUBLIC:140",
|
22
|
|
|
|
|
|
|
"TD" => "CHAD:148",
|
23
|
|
|
|
|
|
|
"KM" => "COMOROS:174",
|
24
|
|
|
|
|
|
|
"CG" => "CONGO:178",
|
25
|
|
|
|
|
|
|
"CI" => "COTE DIVOIRE:384",
|
26
|
|
|
|
|
|
|
"DJ" => "DJIBOUTI:262",
|
27
|
|
|
|
|
|
|
"EG" => "EGYPT:818",
|
28
|
|
|
|
|
|
|
"GQ" => "EQUATORIAL GUINEA:226",
|
29
|
|
|
|
|
|
|
"ER" => "ERITREA:232",
|
30
|
|
|
|
|
|
|
"ET" => "ETHIOPIA:231",
|
31
|
|
|
|
|
|
|
"GA" => "GABON:266",
|
32
|
|
|
|
|
|
|
"GM" => "GAMBIA:270",
|
33
|
|
|
|
|
|
|
"GH" => "GHANA:288",
|
34
|
|
|
|
|
|
|
"GN" => "GUINEA:324",
|
35
|
|
|
|
|
|
|
"GW" => "GUINEA BISSAU:624",
|
36
|
|
|
|
|
|
|
"KE" => "KENYA:404",
|
37
|
|
|
|
|
|
|
"LS" => "LESOTHO:426",
|
38
|
|
|
|
|
|
|
"LR" => "LIBERIA:430",
|
39
|
|
|
|
|
|
|
"MG" => "MADAGASCAR:450",
|
40
|
|
|
|
|
|
|
"MW" => "MALAWI:454",
|
41
|
|
|
|
|
|
|
"ML" => "MALI:466",
|
42
|
|
|
|
|
|
|
"MR" => "MAURITANIA:478",
|
43
|
|
|
|
|
|
|
"YT" => "MAYOTTE:175",
|
44
|
|
|
|
|
|
|
"MA" => "MOROCCO:504",
|
45
|
|
|
|
|
|
|
"MZ" => "MOZAMBIQUE:508",
|
46
|
|
|
|
|
|
|
"NA" => "NAMIBIA:516",
|
47
|
|
|
|
|
|
|
"NE" => "NIGER:562",
|
48
|
|
|
|
|
|
|
"NG" => "NIGERIA:566",
|
49
|
|
|
|
|
|
|
"RE" => "REUNION:638",
|
50
|
|
|
|
|
|
|
"ST" => "SAO TOME AND PRINCIPE:678",
|
51
|
|
|
|
|
|
|
"SN" => "SENEGAL:686",
|
52
|
|
|
|
|
|
|
"SL" => "SIERRA LEONE:694",
|
53
|
|
|
|
|
|
|
"SO" => "SOMALIA:706",
|
54
|
|
|
|
|
|
|
"ZA" => "SOUTH AFRICA:710",
|
55
|
|
|
|
|
|
|
"SH" => "ST HELENA:654",
|
56
|
|
|
|
|
|
|
"SD" => "SUDAN:736",
|
57
|
|
|
|
|
|
|
"SZ" => "SWAZILAND:748",
|
58
|
|
|
|
|
|
|
"TZ" => "TANZANIA:834",
|
59
|
|
|
|
|
|
|
"TG" => "TOGO:768",
|
60
|
|
|
|
|
|
|
"TN" => "TUNISIA:788",
|
61
|
|
|
|
|
|
|
"UG" => "UGANDA:800",
|
62
|
|
|
|
|
|
|
"EH" => "WESTERN SAHARA:732",
|
63
|
|
|
|
|
|
|
"ZR" => "ZAIRE:180",
|
64
|
|
|
|
|
|
|
"ZM" => "ZAMBIA:894",
|
65
|
|
|
|
|
|
|
"ZW" => "ZIMBABWE:716",
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
# Antartica
|
68
|
|
|
|
|
|
|
"AQ" => "ANTARCTICA:010",
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
# Asia
|
71
|
|
|
|
|
|
|
"AF" => "AFGHANISTAN:004",
|
72
|
|
|
|
|
|
|
"BD" => "BANGLADESH:050",
|
73
|
|
|
|
|
|
|
"BT" => "BHUTAN:064",
|
74
|
|
|
|
|
|
|
"BN" => "BRUNEI:096",
|
75
|
|
|
|
|
|
|
"KH" => "CAMBODIA:116",
|
76
|
|
|
|
|
|
|
"CN" => "CHINA:156",
|
77
|
|
|
|
|
|
|
"HK" => "HONG KONG:344",
|
78
|
|
|
|
|
|
|
"IN" => "INDIA:356",
|
79
|
|
|
|
|
|
|
"ID" => "INDONESIA:360",
|
80
|
|
|
|
|
|
|
"JP" => "JAPAN:392",
|
81
|
|
|
|
|
|
|
"KZ" => "KAZAKHSTAN:398",
|
82
|
|
|
|
|
|
|
"KG" => "KYRGYZSTAN:417",
|
83
|
|
|
|
|
|
|
"LA" => "LAOS:418",
|
84
|
|
|
|
|
|
|
"MO" => "MACAU:446",
|
85
|
|
|
|
|
|
|
"MY" => "MALAYSIA:458",
|
86
|
|
|
|
|
|
|
"MV" => "MALDIVES:462",
|
87
|
|
|
|
|
|
|
"MN" => "MONGOLIA:496",
|
88
|
|
|
|
|
|
|
"NP" => "NEPAL:524",
|
89
|
|
|
|
|
|
|
"PK" => "PAKISTAN:586",
|
90
|
|
|
|
|
|
|
"PH" => "PHILIPPINES:608",
|
91
|
|
|
|
|
|
|
"KR" => "REPUBLIC OF KOREA:410",
|
92
|
|
|
|
|
|
|
"RU" => "RUSSIA:643",
|
93
|
|
|
|
|
|
|
"SC" => "SEYCHELLES:690",
|
94
|
|
|
|
|
|
|
"SG" => "SINGAPORE:702",
|
95
|
|
|
|
|
|
|
"LK" => "SRI LANKA:144",
|
96
|
|
|
|
|
|
|
"TW" => "TAIWAN:158",
|
97
|
|
|
|
|
|
|
"TJ" => "TAJIKISTAN:762",
|
98
|
|
|
|
|
|
|
"TH" => "THAILAND:764",
|
99
|
|
|
|
|
|
|
"TM" => "TURKMENISTAN:795",
|
100
|
|
|
|
|
|
|
"UZ" => "UZBEKISTAN:860",
|
101
|
|
|
|
|
|
|
"VN" => "VIETNAM:704",
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
# Australia
|
104
|
|
|
|
|
|
|
"AS" => "AMERICAN SAMOA:016",
|
105
|
|
|
|
|
|
|
"AU" => "AUSTRALIA:036",
|
106
|
|
|
|
|
|
|
"FM" => "FEDERATED STATES OF MICRONESIA:583",
|
107
|
|
|
|
|
|
|
"FJ" => "FIJI:242",
|
108
|
|
|
|
|
|
|
"PF" => "FRENCH POLYNESIA:258",
|
109
|
|
|
|
|
|
|
"GU" => "GUAM:316",
|
110
|
|
|
|
|
|
|
"KI" => "KIRIBATI:296",
|
111
|
|
|
|
|
|
|
"MH" => "MARSHALL ISLANDS:584",
|
112
|
|
|
|
|
|
|
"NR" => "NAURU:520",
|
113
|
|
|
|
|
|
|
"NC" => "NEW CALEDONIA:540",
|
114
|
|
|
|
|
|
|
"NZ" => "NEW ZEALAND:554",
|
115
|
|
|
|
|
|
|
"MP" => "NORTHERN MARIANA ISLANDS:580",
|
116
|
|
|
|
|
|
|
"PW" => "PALAU:585",
|
117
|
|
|
|
|
|
|
"PG" => "PAPUA NEW GUINEA:598",
|
118
|
|
|
|
|
|
|
"PN" => "PITCAIRN:612",
|
119
|
|
|
|
|
|
|
"SB" => "SOLOMON ISLANDS:090",
|
120
|
|
|
|
|
|
|
"TO" => "TONGA:776",
|
121
|
|
|
|
|
|
|
"TV" => "TUVALU:798",
|
122
|
|
|
|
|
|
|
"VU" => "VANUATU:548",
|
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
# Caribbean
|
125
|
|
|
|
|
|
|
"AI" => "ANGUILLA:660",
|
126
|
|
|
|
|
|
|
"AG" => "ANTIGUA AND BARBUDA:028",
|
127
|
|
|
|
|
|
|
"AW" => "ARUBA:533",
|
128
|
|
|
|
|
|
|
"BS" => "BAHAMAS:044",
|
129
|
|
|
|
|
|
|
"BB" => "BARBADOS:052",
|
130
|
|
|
|
|
|
|
"BM" => "BERMUDA:060",
|
131
|
|
|
|
|
|
|
"KY" => "CAYMAN ISLANDS:136",
|
132
|
|
|
|
|
|
|
"DM" => "DOMINICA:212",
|
133
|
|
|
|
|
|
|
"DO" => "DOMINICAN REPUBLIC:214",
|
134
|
|
|
|
|
|
|
"GD" => "GRENADA:308",
|
135
|
|
|
|
|
|
|
"GP" => "GUADELOUPE:312",
|
136
|
|
|
|
|
|
|
"HT" => "HAITI:332",
|
137
|
|
|
|
|
|
|
"JM" => "JAMAICA:388",
|
138
|
|
|
|
|
|
|
"MQ" => "MARTINIQUE:474",
|
139
|
|
|
|
|
|
|
"AN" => "NETHERLANDS ANTILLES:530",
|
140
|
|
|
|
|
|
|
"PR" => "PUERTO RICO:630",
|
141
|
|
|
|
|
|
|
"KN" => "ST KITTS AND NEVIS:659",
|
142
|
|
|
|
|
|
|
"LC" => "ST LUCIA:662",
|
143
|
|
|
|
|
|
|
"VC" => "ST VINCENT AND THE GRENADINES:670",
|
144
|
|
|
|
|
|
|
"TT" => "TRINIDAD AND TOBAGO:780",
|
145
|
|
|
|
|
|
|
"TC" => "TURKS AND CAICOS ISLANDS:796",
|
146
|
|
|
|
|
|
|
"VG" => "VIRGIN ISLANDS BRITISH:092",
|
147
|
|
|
|
|
|
|
"VI" => "VIRGIN ISLANDS USA:850",
|
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
# Central America
|
150
|
|
|
|
|
|
|
"BZ" => "BELIZE:084",
|
151
|
|
|
|
|
|
|
"CR" => "COSTA RICA:188",
|
152
|
|
|
|
|
|
|
"SV" => "EL SALVADOR:222",
|
153
|
|
|
|
|
|
|
"GT" => "GUATEMALA:320",
|
154
|
|
|
|
|
|
|
"HN" => "HONDURAS:340",
|
155
|
|
|
|
|
|
|
"NI" => "NICARAGUA:558",
|
156
|
|
|
|
|
|
|
"PA" => "PANAMA:591",
|
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
# Europe
|
159
|
|
|
|
|
|
|
"AL" => "ALBANIA:008",
|
160
|
|
|
|
|
|
|
"AD" => "ANDORRA:020",
|
161
|
|
|
|
|
|
|
"AM" => "ARMENIA:051",
|
162
|
|
|
|
|
|
|
"AT" => "AUSTRIA:040",
|
163
|
|
|
|
|
|
|
"AZ" => "AZERBAIJAN:031",
|
164
|
|
|
|
|
|
|
"BY" => "BELARUS:112",
|
165
|
|
|
|
|
|
|
"BE" => "BELGIUM:056",
|
166
|
|
|
|
|
|
|
"BG" => "BULGARIA:100",
|
167
|
|
|
|
|
|
|
"HR" => "CROATIA:191",
|
168
|
|
|
|
|
|
|
"CY" => "CYPRUS:196",
|
169
|
|
|
|
|
|
|
"CZ" => "CZECH REPUBLIC:203",
|
170
|
|
|
|
|
|
|
"DK" => "DENMARK:208",
|
171
|
|
|
|
|
|
|
"EE" => "ESTONIA:233",
|
172
|
|
|
|
|
|
|
"FO" => "FAROE ISLANDS:234",
|
173
|
|
|
|
|
|
|
"FI" => "FINLAND:246",
|
174
|
|
|
|
|
|
|
"FR" => "FRANCE:250",
|
175
|
|
|
|
|
|
|
"GE" => "GEORGIA:268",
|
176
|
|
|
|
|
|
|
"DE" => "GERMANY:276",
|
177
|
|
|
|
|
|
|
"GI" => "GIBRALTAR:292",
|
178
|
|
|
|
|
|
|
"GR" => "GREECE:300",
|
179
|
|
|
|
|
|
|
"GL" => "GREENLAND:304",
|
180
|
|
|
|
|
|
|
"HU" => "HUNGARY:348",
|
181
|
|
|
|
|
|
|
"IS" => "ICELAND:352",
|
182
|
|
|
|
|
|
|
"IE" => "IRELAND:372",
|
183
|
|
|
|
|
|
|
"IT" => "ITALY:380",
|
184
|
|
|
|
|
|
|
"LV" => "LATVIA:428",
|
185
|
|
|
|
|
|
|
"LI" => "LIECHTENSTEIN:438",
|
186
|
|
|
|
|
|
|
"LT" => "LITHUANIA:440",
|
187
|
|
|
|
|
|
|
"LU" => "LUXEMBOURG:442",
|
188
|
|
|
|
|
|
|
"MT" => "MALTA:470",
|
189
|
|
|
|
|
|
|
"FX" => "METROPOLITAN FRANCE:249",
|
190
|
|
|
|
|
|
|
"MD" => "MOLDOVA:498",
|
191
|
|
|
|
|
|
|
"NL" => "NETHERLANDS:528",
|
192
|
|
|
|
|
|
|
"NO" => "NORWAY:578",
|
193
|
|
|
|
|
|
|
"PL" => "POLAND:616",
|
194
|
|
|
|
|
|
|
"PT" => "PORTUGAL:620",
|
195
|
|
|
|
|
|
|
"RO" => "ROMANIA:642",
|
196
|
|
|
|
|
|
|
"SK" => "SLOVAKIA:703",
|
197
|
|
|
|
|
|
|
"SI" => "SLOVENIA:705",
|
198
|
|
|
|
|
|
|
"ES" => "SPAIN:724",
|
199
|
|
|
|
|
|
|
"SJ" => "SVALBARD AND JAN MAYEN ISLANDS:744",
|
200
|
|
|
|
|
|
|
"SE" => "SWEDEN:752",
|
201
|
|
|
|
|
|
|
"CH" => "SWITZERLAND:756",
|
202
|
|
|
|
|
|
|
"MK" => "REPUBLIC OF MACEDONIA:807",
|
203
|
|
|
|
|
|
|
"TR" => "TURKEY:792",
|
204
|
|
|
|
|
|
|
"UA" => "UKRAINE:804",
|
205
|
|
|
|
|
|
|
"GB" => "UNITED KINGDOM:826",
|
206
|
|
|
|
|
|
|
"VA" => "VATICAN CITY:336",
|
207
|
|
|
|
|
|
|
"YU" => "YUGOSLAVIA:891",
|
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
# Middle East
|
210
|
|
|
|
|
|
|
"IL" => "ISRAEL:376",
|
211
|
|
|
|
|
|
|
"JO" => "JORDAN:400",
|
212
|
|
|
|
|
|
|
"KW" => "KUWAIT:414",
|
213
|
|
|
|
|
|
|
"LB" => "LEBANON:422",
|
214
|
|
|
|
|
|
|
"OM" => "OMAN:512",
|
215
|
|
|
|
|
|
|
"QA" => "QATAR:634",
|
216
|
|
|
|
|
|
|
"SA" => "SAUDI ARABIA:682",
|
217
|
|
|
|
|
|
|
"SY" => "SYRIA:760",
|
218
|
|
|
|
|
|
|
"AE" => "UNITED ARAB EMIRATES:784",
|
219
|
|
|
|
|
|
|
"YE" => "YEMEN:887",
|
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
# North America
|
222
|
|
|
|
|
|
|
"CA" => "CANADA:124",
|
223
|
|
|
|
|
|
|
"MX" => "MEXICO:484",
|
224
|
|
|
|
|
|
|
"US" => "UNITED STATES:840",
|
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
# South America
|
227
|
|
|
|
|
|
|
"AR" => "ARGENTINA:032",
|
228
|
|
|
|
|
|
|
"BO" => "BOLIVIA:068",
|
229
|
|
|
|
|
|
|
"BR" => "BRAZIL:076",
|
230
|
|
|
|
|
|
|
"CL" => "CHILE:152",
|
231
|
|
|
|
|
|
|
"CO" => "COLOMBIA:170",
|
232
|
|
|
|
|
|
|
"EC" => "EQUADOR:218",
|
233
|
|
|
|
|
|
|
"FK" => "FALKLAND ISLANDS:238",
|
234
|
|
|
|
|
|
|
"GF" => "FRENCH GUIANA:254",
|
235
|
|
|
|
|
|
|
"GY" => "GUYANA:328",
|
236
|
|
|
|
|
|
|
"PY" => "PARAGUAY:600",
|
237
|
|
|
|
|
|
|
"PE" => "PERU:604",
|
238
|
|
|
|
|
|
|
"SR" => "SURINAME:740",
|
239
|
|
|
|
|
|
|
"UY" => "URUGUAY:858",
|
240
|
|
|
|
|
|
|
"VE" => "VENEZUELA:862",
|
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
# Others
|
243
|
|
|
|
|
|
|
"BH" => "BAHRAIN:048",
|
244
|
|
|
|
|
|
|
"BV" => "BOUVET ISLANDS:074",
|
245
|
|
|
|
|
|
|
"IO" => "BRITISH INDIAN OCEAN TERRITORY:086",
|
246
|
|
|
|
|
|
|
"CX" => "CHRISTMAS ISLANDS:162",
|
247
|
|
|
|
|
|
|
"CC" => "COCOS KEELING ISLANDS:166",
|
248
|
|
|
|
|
|
|
"CK" => "COOK ISLAND:184",
|
249
|
|
|
|
|
|
|
"TP" => "EAST TIMOR:626",
|
250
|
|
|
|
|
|
|
"TF" => "FRENCH SOUTHERN TERRITORIES:260",
|
251
|
|
|
|
|
|
|
"HM" => "HEARD AND MCDONALD ISLANDS:334",
|
252
|
|
|
|
|
|
|
"MU" => "MAURITIUS:480",
|
253
|
|
|
|
|
|
|
"MC" => "MONACO:492",
|
254
|
|
|
|
|
|
|
"MS" => "MONTSERRAT:500",
|
255
|
|
|
|
|
|
|
"MM" => "MYANMAR:104",
|
256
|
|
|
|
|
|
|
"NU" => "NIUE:570",
|
257
|
|
|
|
|
|
|
"NF" => "NORFOLK ISLAND:574",
|
258
|
|
|
|
|
|
|
"WS" => "SAMOA:882",
|
259
|
|
|
|
|
|
|
"SM" => "SAN MARINO:674",
|
260
|
|
|
|
|
|
|
"PM" => "ST PIERRE AND MIQUELON:666",
|
261
|
|
|
|
|
|
|
"TK" => "TOKELAU:772",
|
262
|
|
|
|
|
|
|
"UM" => "UNITED STATES MINOR OUTLYING ISLANDS:581",
|
263
|
|
|
|
|
|
|
"WF" => "WALLIS AND FUTUNA ISLANDS:876",
|
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
"AO" => "ANGOLA:024",
|
266
|
|
|
|
|
|
|
"BA" => "BOSNIA AND HERZEGOWINA:070",
|
267
|
|
|
|
|
|
|
"CU" => "CUBA:192",
|
268
|
|
|
|
|
|
|
"IR" => "ISLAMIC REPUBLIC OF IRAN:364",
|
269
|
|
|
|
|
|
|
"IQ" => "IRAQ:368",
|
270
|
|
|
|
|
|
|
"KP" => "DEMOCRATIC PEOPLES REPUBLIC OF KOREA:408",
|
271
|
|
|
|
|
|
|
"LY" => "LIBYAN ARAB JAMAHIRIYA:434",
|
272
|
|
|
|
|
|
|
"RW" => "RWANDA:646",
|
273
|
|
|
|
|
|
|
"GS" => "SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS:39",
|
274
|
|
|
|
|
|
|
"CD" => "DEMOCRATIC REPUBLIC OF THE CONGO:180",
|
275
|
|
|
|
|
|
|
"PS" => "OCCUPIED PALESTINIAN TERRITORY:275"
|
276
|
|
|
|
|
|
|
);
|
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
sub getCountry {
|
280
|
0
|
|
|
0
|
0
|
|
my $countryCode = shift; # give country code as an arguement to get country name
|
281
|
0
|
0
|
|
|
|
|
if(exists $CountryCodes::countryHash{$countryCode}){
|
282
|
0
|
|
|
|
|
|
my $countryName;
|
283
|
|
|
|
|
|
|
my $countryNumber;
|
284
|
0
|
|
|
|
|
|
($countryName, $countryNumber) = split(/:/, $CountryCodes::countryHash{$countryCode});
|
285
|
0
|
|
|
|
|
|
return $countryName;
|
286
|
|
|
|
|
|
|
}
|
287
|
0
|
|
|
|
|
|
else { return undef }
|
288
|
|
|
|
|
|
|
}
|
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
sub getNumericCountryCode {
|
291
|
0
|
|
|
0
|
0
|
|
my $countryCode = shift; # give country code as an arguement to get numeric country code
|
292
|
0
|
0
|
|
|
|
|
if(exists $CountryCodes::countryHash{$countryCode}) {
|
|
0
|
|
|
|
|
|
|
293
|
0
|
|
|
|
|
|
my $countryName;
|
294
|
|
|
|
|
|
|
my $countryNumber;
|
295
|
0
|
|
|
|
|
|
($countryName, $countryNumber) = split(/:/, $CountryCodes::countryHash{$countryCode});
|
296
|
0
|
|
|
|
|
|
return $countryNumber;
|
297
|
|
|
|
|
|
|
}
|
298
|
|
|
|
|
|
|
else {return undef}
|
299
|
|
|
|
|
|
|
}
|
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
sub isValidCountryCode {
|
303
|
0
|
|
|
0
|
0
|
|
my $countryCode = shift;
|
304
|
0
|
|
|
|
|
|
return (exists $CountryCodes::countryHash{$countryCode});
|
305
|
|
|
|
|
|
|
}
|
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
sub getCCodeFromCName {
|
308
|
0
|
|
|
0
|
0
|
|
my $country = shift; # give country name as an arguement to get country code
|
309
|
0
|
|
|
|
|
|
$country = uc($country);
|
310
|
0
|
|
|
|
|
|
my $key;
|
311
|
|
|
|
|
|
|
my $countryName;
|
312
|
0
|
|
|
|
|
|
my $countryNumber;
|
313
|
0
|
|
|
|
|
|
foreach $key (keys(%CountryCodes::countryHash)){
|
314
|
0
|
|
|
|
|
|
($countryName, $countryNumber) = split(/:/, $CountryCodes::countryHash{$key});
|
315
|
0
|
0
|
|
|
|
|
if ($country eq $countryName) { return $key}
|
|
0
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
}
|
317
|
0
|
|
|
|
|
|
return undef;
|
318
|
|
|
|
|
|
|
}
|