http://www.perlmonks.org?node_id=1074179


in reply to Syntax error

Just before option 2, you have written }end if. There's no such thing as an endif in Perl, you forgot to make it a comment :)

I didn't read your whole script. One advice though, instead of ($base eq 'g' or $base eq 'G') you can write (lc $base eq 'g') (see lc). That should be the easy enough to understand. Then, if you want to try matching $base against several values you can write (grep { lc $base eq $_ } 'a', 'c', 'g', 't'). Read grep on that.

A lot of Perl users would use regular expressions instead of grep and lc, you can have a look at perlretut on the subject, if you feel adventurous.