title: Split single long line from text file into multiple lines (CSV)
body: <p>I have a text file that is a long single line, which I need to split into multiple lines that I can print to a CSV file. I have tried multiple methods, and I'm super close, but my data output is incorrect. I'm stuck on splitting the string into array. </p>
  
  <p>I've tried the code below and, while it is splitting the lines semi-properly, the data is not split into array. </p>
  
  <pre><code>open (INPUT, '&lt;', $proxy_file ) or die "Cannot open proxy file\n";
  open(OUTPUT, '&gt;', $complete) or die "Cannot create $complete.'\n'";
  while(my $line = &lt;INPUT&gt;){
      chomp $line;
      $line =~ s/,//g;
      $line =~ s/://g;
      my @fields = split /(?&lt;=\.com)/, $line;
  
      print OUTPUT $_, "\n" for @fields;
  </code></pre>
  
  <p>This is the example data</p>
  
  <pre><code>JACOB2345@gmail.com:YdjfkoweU, LUKE453@gmail.com:YdjfkoweU, WESLEY233@gmail.com:YdjfkoweU, Bruce2423@gmail.com:YdjfkoweU, Angel@gmail.com:YdjfkoweU, Lukder@gmail.com:YdjfkoweU, 
  </code></pre>
  
  <p>I want to split it to: </p>
  
  <pre><code>FIELD 1             FIELD2
  JACOB2345@gmail.com YdjfkoweU
  LUKE453@gmail.com YdjfkoweU
  </code></pre>
  
  <p>etc</p>