title: while loop in expect script
body: <p>I'm new to expect scripting, I want to write something like this:</p>
  
  <pre><code>set variable;
  $variable = expect -exact "\/----Enter Password----\\"
  while { != $variable } {
  send -- {^[-}
  }
  </code></pre>
  
  <p>I want to keep sending escape+hyphen character until I expect this prompt: "/----Enter Password----\". I have written the above code but it is not working. How do I do this, kindly help me.</p>