in reply to Re: Syntax error
in thread Syntax error

Right. Furthermore, the perlish way is to avoid iterating over characters, if possible. Consider this:

my $A_count = ($sequence =~ tr/Aa/Aa/);