title: Groovy list with variable name containing a dot (.) gets converted to string
body: <p>I have a list in groovy, defined as </p>
  
  <pre><code>env.list = ["abc","def"]
  </code></pre>
  
  <p>If I try using this in a for loop</p>
  
  <pre><code>for (letters in env.list) {
    print("Letter is $letters")
  }
  </code></pre>
  
  <p>It will iterate over each letter and print the following -</p>
  
  <pre><code>Letter is [
  Letter is "
  Letter is a
  .....
  </code></pre>
  
  <p>If I define the list as follows -</p>
  
  <pre><code>list = ["abc","def"]
  </code></pre>
  
  <p>It will treat this as a list. The for loop will print the following.</p>
  
  <pre><code>Letter is abc
  Letter is def
  </code></pre>
  
  <p>Was using groovy to run my Jenkins pipeline.</p>
  
  <ol>
  <li>Why is there a difference based on the name?</li>
  <li>How can we define a list using a variable name with a dot (.)?</li>
  </ol>