in reply to Pulling lines from a file into an array?

/me posts his first ever Mr Grumpy-Monk reply

Homework alert. Although hardburn has kindly provided you with a bunch of code, it's the kind of code that 10 minutes digging around this site would have produced. Honestly mate - it's for your own good :) Sure - you could sail through on other peoples code and get the piece of paper you need - *or* you could learn something. Trust me - it's more fun the second way.

Cheers
Ben.