in reply to update a txt file

You should be passing seek 0 (zero) as the second argument, not 5. You are missing a semi-colon after line 36, and there is no such module Term::ReadALine. My answersmake about as much sense as your question.