title: Regular expression to validate an email in perl
body: <p>I am new in Perl and trying to catch hold of the scripting language where I come across regular expression to validate a email address. I am sharing the perl script. I am not sure where I am making mistake in it. The \@ part is omitted always following which the correct email id is also showing as invalid. </p>
  
  <p>Here is the code :</p>
  
  <pre><code>#!/usrs/bin/perl/
  $string = "XYZ@yahoo.com";
  if ( $string =~ /([a-zA-Z]+)\@([a-zA-Z]+)\.(com|net|org)/)
  {
      print "TRUE";
      print $string;
  }
  else
  {
      print "FALSE";
      print $string;
  }
  </code></pre>
  
  <p>Thanks for your help.</p>