my $base = ("A"|"C"|"G"|"T");
Erm, this is giving you the bitwise or of the four characters. This probably isn't a useful value. Of course you never actually use it anyhow.
while (<INPUT>) { $sequence = $_ @array = () @array = split (/\n/, $sequence );
If you want to use another name for the input line, declare it in the while itself (while( defined( my $sequence = <INPUT> ) )). Also it makes little sense to empty @array right before you assign to it. As for splitting on newlines, that's not really going to work since you haven't changed $/ and you'll only be getting back a line at a time. You probably want to do $/ = "" to get paragraph mode; see perldoc perlvar.
In reply to Re: simple but stuck
by Fletch
in thread Base sequence length in fasta format file
by lolly
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |