title: perl open file error handling
body: <p>I want to do some task when the file is not opened in the Perl program below. But when I run it, I am getting syntax errors. What's wrong with it?</p>
  
  <pre><code>my $LOGPATH = $ENV{DATA_OU};
  my $LOGFILE =  "cdj_rep" . "." . "test" . ".rpt";
  
  if ! (open(OUT,"&gt;$LOGPATH/test1/work/$LOGFILE")) {
     print "testin";
     return;  
  }
  
  close(OUT);
  </code></pre>