open(FILE,'/path/to/file'); print while (); close(FILE); ... open(FILE2,'/path/to/file2'); print while (); close(FILE2);