|Just another Perl shrine|
Condition on multiple lines and big fileby epimenidecretese (Acolyte)
|on Dec 06, 2013 at 10:17 UTC||Need Help??|
epimenidecretese has asked for the
wisdom of the Perl Monks concerning the following question:
I'm trying to solve the following problem but I'm not sure if perl it's the right tool for it. My data look like this:
As yoou can see, whene there is an I-GPE it means that the name has to be composed whit the line before (i.e. Buenos Aires); when you have just B-GPE and the following line is also B-GPE, than it means they are different names.
Problem is the file is very big and I can't slurp it all at once.
I would like an output like the following
Someone has any idea?
One of Crete's own prophets has said it: 'Cretans are always liars, evil brutes, lazy gluttons'.