Thanks to previous posters. Posts so far have been really helpful.
The behaviour of nested while loops was not something I expected - as I googled it right now it seems it is quite a surprise to many.
I guess it is something you cant find so easily in ...for Dummies books anymore :D.
I do admire the community. Not only do I usually learn a thing or two here or find a quick fix for something stupid I wrote in my script. But quite often when I google something Perl related I find a tremendous amount of links back to this place again and again.