• =~ is for regex, but this looks like a glob. Use = instead.
  • Problematic code:
  • Correct code:
  • Rationale:
  • Exceptions:
  • Related resources: