title: Perl: check if environment variable is set
body: <p>I have been using </p>
  
  <p><code>if(exists $ENV{VARIABLE_NAME} &amp;&amp; defined $ENV{VARIABLE_NAME})</code> in several places my perl script. </p>
  
  <p>I feel it clutters the code and so assigned its value to a variable. </p>
  
  <pre><code>$debug = $ENV{VARIABLE_NAME};
  </code></pre>
  
  <p>But, now I cant check for <code>exists</code> on a scalar value. Is there a way I can check exists for a scalar value?   </p>