Groovy is nice to solve small problems (which usually will never pop up; but may!)
Note: The second example using eachLine() on a text file is the same file i used for my Automatic Resource Management (ARM) blocks example.