title: Perl: custom sort order?
body: <p>A stenographic keyboard has the keys in a specific order: STKPWHRAO*#EUFRPBLGTS.</p>
  
  <p>I am attempting to take an input $word and determine if its letters follow this order, from left to right. </p>
  
  <p>So KAT would be valid, but FRAG would not be, because while F is before R on the right side, they are not before A-. TKPWAUL would work, but GAUL would not, because -G is not before A. The keys must be ordered from left to right.</p>
  
  <p>I'm getting tripped up by some letters appearing twice in the order.</p>
  
  <p>Thank you very much for any ieas!</p>