Suppose you have a ?le orase of city and country names, like this:
Cluj, RomaniaDebrecen, HungaryKlagenfurt, AustriaBerlin, GermanySzeged, HungaryBudapest, HungaryLintz, Austria
Write a program towns.pl such that when it will read from the ?le orase will produce a sorted output with each country mentioned once, followed by an alphabetical list of the cities in that country:
Austria: Klagenfurt, Lintz.Hungary: Budapest, Debrecen, Szeged.Germany: Berlin.Romania: Cluj.
Run your program against any other ?le (say, myfile) with structure similar to orase. Then execute your program against both ?les (orase and myfile) simultaneously.