in reply to Re^3: system() issuein thread system() issue
Also make sure you close your files in sub1.