Hi Thanks for your suggestion. But what i need is the program while reading the config file doesn't take the lines that is started with hash and i can store the elements from ITEM NO:1 [aaa] 111 [bbb] 222 [ccc] 333 in an array and send that array as an argumnet during the calling of a sub routine which present in another module and when that sub returns 1 to the main program then it stores ITEM NO:2 [ddd] 444 [eee] 555 [fff] 666 in an array and send it as the argument during the sub routine call. When that sub returns 1 it stores the ITEM NO:3 .. .. .. in an array and send it and so on. When there is no ITEM NO remains then the program exits.