David> fn = file('foo.txt') David> txt = fn.readlines() David> str = ?something?(txt) # or txt.?something?()... Assuming what you really want is to get the contents of the file in one gulp, this should work: fn = file('foo.txt') str = fn.read() -- Skip Montanaro skip at pobox.com consulting: http://manatee.mojam.com/~skip/resume.html