Vineet Pande <mailto:[EMAIL PROTECTED]> wrote: > hi, > In the following code which reads a file.txt (SEE ATTACHMENT) where I > am trying to understand how to put the DNA sequence in to a single > string... > > print "enter file with DNA sequence: "; > $seqfile = <STDIN>; > chomp $seqfile; > unless ( open(DNAFILE, $seqfile) ) > { > print "can't open!!\n"; > exit; > } > @dna = <DNAFILE>; > close DNAFILE;
# If only you did the following to remove the newlines from each line of the file. chomp(@dna); > $dna = join( '', @dna); > print "$dna\n"; > > THE OUTPUT IS EXACTLY THE SAME AS IN file.txt.....Why don't we get > the string joined...of course i agree i must clean whitespace...bu > then what is expected out of join( '', ....). WHAT '' means? '' means null string. HTH... --Ankur Quotations are for people who aren't saying things worth quoting. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>