CountryCode(3pm) User Contributed Perl Documentation CountryCode(3pm)NAME
NCC::CountryCode - Perl extension for blah blah blah
SYNOPSIS
use NCC::CountryCode;
my $cc = new NCC::CountryCode();
my $cc_hash = $cc->getCCs();
print ($cc->isCC('NL')) ? "exists" : "non-existing";
$cc->CC2Country('fr');
$cc->Country2CC('russia');
DESCRIPTION
This module provides class and several methods to simplify mapping between country names and country codes, as they assigned in the
ISO3166.
The CC2Country() method maps country code to the corresponding country name or empty string, if it doesn't exist.
The Country2CC() tries to map passed country name into country code. As the spelling of the name may vary, this function tries to find all
possible matches for passed name. In array context method returns hash of country codes and names, in scalar - a string, containing all
possible country codes and corresponding country names.
The isCC() method verifies, that passed country code is a legal one and returns it in upper case. Otherwise it returns empty string.
The getCCs() method returns the reference to the internal hash, that containes all the country codes with corresponding them country names.
BUGS
In addition to the country codes defined by ISO3166 standart this module also introduce 'UK' as a synonim for 'GB' and 'EU' as additional
'virtual' name for the Europe itself.
AUTHOR
Timur Bakeyev, timur@ripe.net
SEE ALSO perl(1).
perl v5.10.1 2001-09-10 CountryCode(3pm)
Check Out this Related Man Page
APT-SPY.CONF(5) File Formats Manual APT-SPY.CONF(5)NAME
apt-spy.conf - configuration file for apt-spy(8)DESCRIPTION
apt-spy.conf is the configuration file for apt-spy(8). It consists of a series of area labels, followed by a list of countries belonging
to that label. Whitespace is ignored.
Comments may be added anywhere, and begin with the hash ('#') character. Once a hash character is encountered, the rest of the line is
ignored.
A label consists of any alphanumeric characters, and ends with a colon character (':'). The label must be on a line by itself (excluding
comments).
Following a label are a list of country codes (one per line) of countries belonging to that label.
Each country has a unique two-letter country code corresponding to its top level domain identifier. This is the same as the ISO3166 code.
You can find the country code for a specific country either by looking at /var/lib/apt-spy/mirrors.txt, or by looking at the commented
examples in the default apt-spy.conf.
Labels cannot exist within labels. The end of a label section is signaled by the start of a new one, or by the end of file.
Any valid label existing in apt-spy.conf can be specified to apt-spy using the '-a' option. apt-spy will then proceed to benchmark the
mirrors in the list of countries associated with that label.
EXAMPLES
This is an example of a valid apt-spy.conf file:
USUK:
GB # United Kingdom
US # United States
Australia:
AU
France-Germany-Netherlands:
FR
DE
NL
There is a default configuration file included with apt-spy. For further examples, and for a list of valid country codes, please refer to
this.
SEE ALSO apt-spy(8), apt(8), sources.list(5)
20th May, 2003 APT-SPY.CONF(5)
Hi All,
I have a text file below. How do i grab all the data between "05T00NPQSMR1" and "****" using awk ? Pls note that the text lines may not be fixed and text content is dynamic. Pls help. Thanks
Below is my code where $LOT_SUFFIX is my shell variable.
awk '/'"$LOT_SUFFIX"'/,/blah/'... (16 Replies)
I want to read all numeric records that start with the line id and write them to a new file.
input:
====
blah blah
blah blah
id
10 11 12
13 14 15
blah blah
blah blah
id
16 17 18
19 20 21
output:
10 11 12
13 14 15 (10 Replies)
any idea please!!!
I want to pick up all lines of "state" and "desc" from x files:
...
# state
blah blah
blah blah
...
..
# desc
blah blah
blah
....
Thx
Andy (7 Replies)
Hello, i'm workig with a file with structural information about biological macromolecules (proteins etc).
In a certain file, the info is structured like this
@<TRIPOS>MOLECULE
blah 1
blah 2
blah 3
@<TRIPOS>MOLECULE
foo 1
foo 2
foo 3
@<TRIPOS>MOLECULE
mmm 1
mmm 2
mmm 3
I would... (7 Replies)
Hi All,
I have a 2 files. File1 i am generating using an ETL tool, which is a comman seperated delimited file which contains country code & load date.
everytime, this country code will be updated from a table. It might be AB or BA & ld_date will be for which date we need to load the file.
... (7 Replies)
Hi Experts,
please see below are the dynamic text files.
abc,445,hhh,data,10,country,data,88,city
abc,445,hhh,data,10,country,data,88,city
abc,445,hhh,data,10,country,data,88,city
abc,445,hhh,data,10,country,data,200,city
abc,445,hhh,data,10,country,data,88,city,games,100,data,20,basket... (10 Replies)
Found this site where you can check boxes for countries where you've been and draws a map for you. It doesn't mean that you've seen the length and breadth of a country, though. Just being to a single city is enough to mark the whole country as 'visited'.
This is what my map looks like:... (20 Replies)
Hi,
I've set up a script so that a user answers questions, and then these answers come back onto the screen accompanied by text that I've echoed. Is there a way of putting this into a new file?
Thanks (7 Replies)
Hi,
I am having an Input file .which is having a list of names.
comapring with our database , needs to write the out put in file called output.txt , format should be name--> country--->phone number
could you please help me..
thanks in advance (7 Replies)
Hi all,
I need to prune a var's content as follows:
VAR='blah blah # seew seew'
NEWVAR='blah blah'
(without blanks)
I need also to perform this change by using variable substitution within bash shell. I've tried it with the following subst:
VAR2=${VAR/ \#*/}
but the... (7 Replies)
I have a very big log file which looks like this:
I need to split this file and create files with "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+" as the delimiter.
The file names need to be the contents of the next line after the delimiter(FIRST_ITEM,SECOND_ITEM...so on..). (7 Replies)
I have a file named Me_thread_spell.txt that I want to split into smaller files. I want it to be split in each place there is a ;;;. For example,
blah blah blah ;;;
blah bhlah hlabl
awasnceuir
asenduhfoijhacseiodnbfxasd;;;
oabwcuhaweoir;;;
This full file would be three separate files... (7 Replies)
Dear all,
I find a perl script that contains the following codes. Does anybody know the meaning of codes highlight.
.....
@field = parse_csv($file);
chomp(@field);
........
........
sub parse_csv {
my $text = shift;
my @new = ();
push( @new, $+ ) while $text =~ m{... (9 Replies)
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Consider a input.txt as:
country=india
ram
ajit
sham
vijay //need to be removed
country=india
suman
tharan
raju
what i did is:
awk '$0~pat {n=NR+4} NR!=n' pat='country=india' input.txt > output.txt
My looking to the above code is between any two country=india ,... (8 Replies)