http://qs321.pair.com?node_id=158312

foxy has asked for the wisdom of the Perl Monks concerning the following question:

i am trying to write a script that will parse a genbank DNA file, but when i run the program it won't run. here's the code;
#! 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