Input/output of text files

Hi - can anyone pass along instructions for writing a text file - ie. the content of a variable (array) to a text file for retrieval at a later time?

Thanks!