title: Do I need to escape a semicolon in a Perl regular expression literal?
body: <p>Someone is telling me I need to escape a semicolon in a Perl regular expression literal. That is, to match a line containing a semicolon, I should use <code>/\;/</code> and not <code>/;/</code>.</p>
  
  <p>From what I've read, the semicolon has no special meaning in a regular expression literal, so escaping it seems unnecessary. I've done some experiments and <code>/;/</code> seems to work fine. With warnings turned on and the <code>use strict;</code> pragma in effect, <code>perl</code> doesn't complain.</p>
  
  <p>Is there some reason why <code>/\;/</code> is better than <code>/;/</code>? Is this version-dependent?</p>