title: How to create an anonymous array ([]) with 'empty slots'?
body: <p>I can create an array with 'empty slots' in it:</p>
  
  <pre><code>$ perl -wde 1
  ...
    DB&lt;1&gt; $x[2] = 0
    DB&lt;2&gt; x \@x
  0  ARRAY(0x103d5768)
     0  empty slot
     1  empty slot
     2  0
  </code></pre>
  
  <p>or</p>
  
  <pre><code>  DB&lt;3&gt; $#y = 4
    DB&lt;4&gt; x \@y  
  0  ARRAY(0x103d5718)
     0  empty slot
     1  empty slot
     2  empty slot
     3  empty slot
     4  empty slot
  </code></pre>
  
  <p>Please note: this is not the same as assigning <code>undef</code>.</p>
  
  <p>But how do I specify that for an anonymous array using <code>[</code> and <code>]</code>?</p>
  
  <p>This will not work:</p>
  
  <pre><code>  DB&lt;5&gt; x [,,0]
  syntax error at (eval 27)[/usr/local/lib/perl5/5.10.0/perl5db.pl:638] line 2, near "[,"
  </code></pre>
  
  <p>And this fails too, since I only get the assigned value:</p>
  
  <pre><code>  DB&lt;6&gt; x []-&gt;[2] = 0
  0  0
  </code></pre>
  
  <p>Bonus question: how can I check for an 'empty array slot' in my Perl script?</p>
  
  <p>Background: In my test scripts I would like to be able to compare array contents precisely. For example I want to distinguish between 'not assigned' and 'assigned with an undef value'.</p>
  
  <p>Thanks for any insights.</p>