[Bioperl-l] Printing strings without return

Andreas Kahari ak at ebi.ac.uk
Wed Mar 24 13:32:10 EST 2004


On Wed, Mar 24, 2004 at 06:56:10PM +0100, Gyoergy Abrusan wrote:
[cut]
> I wrote a simple script:
> 
> open FILE, "input.txt";
> open (OUT, ">$RESULTS.txt")or die "$0:ERROR: can't write report file\n";
> 
> while ($seq=<FILE>)
> {
> if ($seq =~ />/)
>  	{	
> 	print OUT "\n$seq";
> 	}		
> else

chomp($seq);

> 	{
> 	print OUT "$seq";   	
> 	}
> }
> 
> 
> close OUT;
> 
> The problem is that the lines in FASTA contain a RETURN at the end, so 
> the script doesn't change anything. Is there an option in perl to print 
> till the RETURN?
> 



-- 
|[==]| Andreas Kähäri      EMBL, European Bioinformatics Institute
|=][=|                     Wellcome Trust Genome Campus
|[==]| DAS Project Leader  Hinxton, Cambridgeshire, CB10 1SD
|=][=| Ensembl Developer   United Kingdom


More information about the Bioperl-l mailing list