open (MYFILE, 'mypath'); while (){ #my code here } #### #magically turn $myString into a filehandle. while (){ #my code here }