Hi Prashant--
It's hard to say what's going wrong there. I don't see any obvious problems with your code. A few things to try:
1) Check the return value of open(), i.e. the value of $path to make sure it isn't -1, which would indicate that Arbortext can't open the specified file
2) Try opening the file in read only mode ("r" instead of "r+")
3) Make sure your CSV file is not open in any other program like Excel.
4) Check the contents of $main::ERRORS after you run this. It's possible some error is happening during the process; in that case you should see an entry in this array. (You can use join() to see all the entries, e.g. response(join($main::ERRORS)).)
The $line variable retains the line terminator (newline), so sometimes this can cause problems depending on how you use the variable. If you are getting an error about "unterminated string constant", that is likely to be the problem. To fix that, use chop($line) before you try to do anything else with it.
--Clay