in reply to Puzzling $| behavior

$| is either 1 or 1. If it's 0 and you are telling it to change value with $|--, it's go to 1. If this isn't what you want seems to me an if statement is in order. Lyle