in reply to Reading Data from a file

Anon,

Your suspicions are in fact correct. The subroutine CleanFiles only opens your (temporary) data file and does not remove data from that file. At the end of the run of your program you'll need to do some kind of file cleanup.

One way of doing it would be a command like:
system("> $my_temp_file");
A more Perlish (and safer) solution would be to use File::Temp to handle creation and destruction of the temp file for you.