in reply to Trouble with flow control

In your conditionals you probably want eq instead of = (for which you probably meant to have == anyhow.)

-enlil