title: Why does my Perl program warn about an uninitialized value?
body: <p>I've written the Perl script below which generates a warning and I can't work out why.</p>
  <pre><code>#!/usr/local/bin/perl -w
  
  $status = $ENV{ 'STATUS' };
  if ( $status eq &quot;&quot; )
  {
      $status = 0;
  }
  else
  {
      $status = 1;
  }
  </code></pre>
  <p>It says &quot;<code>Use of uninitialized value in string eq at ./x.pl line 4.</code>&quot;</p>
  <p>Line 4 is the &quot;<code>if ( $status eq &quot;&quot; )</code>&quot; line, but the variable was initialised...</p>
  <p>How can I get rid of this warning?</p>