title: What is the Perl context with range operator?
body: <p>I'm a Perl newbie. I want to understand Perl context in conjunction with range operator. This is my code.</p>
  
  <pre><code>use strict;
  use warnings;
  
  my $asc = ( 10 .. 50 );
  print "$asc\n";
  </code></pre>
  
  <p>I have two doubts. </p>
  
  <ol>
  <li><p>If the expression ( 10 .. 50 ) returns an array, then, as it's a scalar context, "asc" variable should be assigned the length of the array, that is, 41.</p></li>
  <li><p>If expression ( 10 ..50 ) returns a list, then, as it's a scalar context, "asc" variable should be assigned the last item from the list, that is, 50.</p></li>
  </ol>
  
  <p>But, I get the following shout ..</p>
  
  <pre><code>Use of uninitialized value in range (or flip) at main.pl line ..
  </code></pre>
  
  <p>Appreciate and welcome any guide.</p>