The variable wasn't the problem. Did you read my reply? I left your code as it was except for the addition of the t switch in the $read identifier.