While your example has the key and value pair on the same row, mine is
different and may span several rows, e.g.
>1
USA, MA, Boston
>2
China,
Beijing,
Chaoyang
>3
....
so I have to parse the information file first. However, I don't know how
my %absent = map {$_ => 1} 1..keys %countries;
works.
I'd appreciate if you would explain a little for the abc below because
perldoc map examples do not cover the combined concepts below:
a) map
b) {$_ => 1}
c) 1..keys
After knowing what they do, then I can produce my own scripts for different
file formats. Thanks again.
|