Hi Corion,
Thanks for reply. Yes i will use foreach loop.My input is a file with all the entries, for eg:
/home/shekarkcb/abc/
/home/shekarkcb/def/
/home/shekarkcb/abc/
I got to do these things
1)Read Each entry from file, go to that folder, find *END*txt.
if found then delete a entry from file.
2)If not found then do a next till finds *END*txt.
I have used Arrays for these.
-> First open file, put all entry in an array.
-> while array (@array_LAST_MOD_FILE) length not equals to 0, for each of that entry (used c style for loop as you mentioned) i.e for each directory used find to 'find' the file *END*txt, and stored result in an array.
-> Again checking the length of it is 0 means no result obtained (no END file),
if not 0 then yes got END file inside that directory so delete the entry from @array_LAST_MOD_FILE,
Here is what the problem, i will delete the entry here, but outer while still has the entry.so it is going to infinite. Hope now you got the problem. Please suggest me a soln or a better way to do this.
Thanks,ShekarKCB