title: Remove the last character of an array
body: <p>i'm trying to remove the last character of an array.</p>
  
  <p>I have an array with:</p>
  
  <p>name1;</p>
  
  <p>name2;</p>
  
  <p>Now i want to remove the last ";".</p>
  
  <p>I'v though on something like:</p>
  
  <pre><code>$array = $array | Select -last 1 | foreach{$_.replace(";", "")}
  </code></pre>
  
  <p>But thats just an idea. Also not working, because it will leave only the last entry.</p>