Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: It's all getting messy - remove whitespace

by tinita (Parson)
on Jun 15, 2014 at 10:50 UTC ( #1089933=note: print w/replies, xml ) Need Help??

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1089933]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2021-01-25 08:47 GMT
Find Nodes?
    Voting Booth?