foxy has asked for the wisdom of the Perl Monks concerning the following question:
#! usr/local/bin/perl -w use strict; my $file; my $seq; my @annoation; print "please type in the name of a file\n"; $file = <STDIN>; get_dna (@annotation, $file,$seq); print $seq; sub get_dna { my ($line, $seq) = @_; my $in_sequence = 0; foreach my $line ($file) { if ($line =~ /^\/\/n/) { last; } elsif ($in_sequence) { $$seq .= $line; } elsif ($line =~ /^ORIGIN/) { $seq = 1; } else { push (@annotation, $line); } } $$seq =~ s/[\s0-9]//g; }
Edit kudra, 2002-04-15 Changed title
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: please help me!!
by Fletch (Bishop) on Apr 11, 2002 at 14:21 UTC | |
Re: please help me!!
by PrimeLord (Pilgrim) on Apr 11, 2002 at 14:27 UTC | |
Re: please help me!!
by tachyon (Chancellor) on Apr 11, 2002 at 15:19 UTC | |
Re: please help me!!
by robsv (Curate) on Apr 11, 2002 at 18:15 UTC | |
(smitz)Re: please help me!!
by smitz (Chaplain) on Apr 11, 2002 at 14:45 UTC |