in reply to error in script
I Guess you will be using open() function call in your code with | character.