in reply to It's all getting messy - remove whitespace

Whenever you don't know what's in your data (you think it contains whitespaces) print it to make sure.
use Data::Dumper; local $Data::Dumper::Useqq = 1; # make "invisible" characters visible print Dumper \@spliceout;

Then read about array interpolation in perldata:
Arrays and slices are interpolated into double-quoted strings by joining the elements with the delimiter specified in the $" variable

The problem is in this line:
  print MYFILE (">" . "$col_ID[$i]" , "@spliceout" , "\n");

Replies are listed 'Best First'.
Re^2: It's all getting messy - remove whitespace
by lecb (Acolyte) on Jun 15, 2014 at 11:21 UTC

    Thank you! I have modified the script and it now works!

    my @splicejoin = join('', @spliceout); open (MYFILE, '>>fasta'); print MYFILE (">" . "$col_ID[$i]" , "@splicejoin" . "\n"); + close (MYFILE);

    Many thanks for the quick responses and for pointing me in the direction about it not actually being whitespace; didn't realise I could do that. Thanks again.