in reply to Re: Syntax error
in thread Syntax error

Or better still, lowercase $base as soon as you set it:

$base = lc substr($sequence, $position, 1);

Then comparisons can just be like:

if ($base eq 'g' or $base eq 't') { ... }

... and you don't need to worry about capital letters at all.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Replies are listed 'Best First'.
Re^3: Syntax error
by Eily (Monsignor) on Feb 10, 2014 at 09:21 UTC

    Yeah, I guess it might have been a better idea to look at least a little more through the code before giving advice :). I just commented on the big obvious thing that jumped on my face, but I'm sure there is more than one way to improve it (that does sound perlish already :D).