title: GetOptions() to enforce choice of strings
body: <p>I have been unable to formulate a search phrase for this so you have my apologies if this has been asked already.  (Likely has been.)</p>
  
  <p>Among my options to a new Perl utility I'm writing is a --sortby option.  The available choices I'm giving the user are:</p>
  
  <ul>
  <li>--sortby TID</li>
  <li>--sortby SID</li>
  </ul>
  
  <p>Now it's really <em>very</em> easy for me to implement this after the GetOptions call, merely by checking if ($opt_sortby eq "SID" || $opt_sortby eq "SID"). (Actually, I've coded that a bit more elegantly but that's another issue.)  But I'm trying to push my knowledge and see if I can force this choice to be enforced by GetOptions, something like</p>
  
  <pre><code>GetOptions('sortby=s'  =&gt; {"SID" | "TID"});
  </code></pre>
  
  <p>Please note that I'm merely using notation commonly used in documentation to represent a mandatory "one of these" choice.  I don't really expect this exact syntax in GetOptions.</p>
  
  <p>Ideas anyone?</p>
  
  <p>Thanks mucho. (Szépen köszönöm, in case G.S. answers :-)</p>
  
  <p>-- Jacob S.</p>