open (DATF, "<$file_name"); while( ) { #-- do whatever here #-- user may interrupt before finishing the while...loop } close(DATF);