in reply to Silly question about regular expressions

Try:
$title =~ /^(Dr|Lady|Lord|Miss|Mr|Mrs|Ms|Sir)$/
The alternates are now in parentheses, and the placement of the ^ and $ anchors is slightly different.
  • Comment on Re: Silly question about regular expressions