in reply to Perl Beginner

You are reading a line from the terminal, not just a single character. You need chomp to remove the line ending character(s). Also, get in the habit of indenting your code one level when looping.
print "please enter one character: "; $char = <>; chomp $char; while ($char ne ".") { if ($char eq "a") { $count++; } print "please enter one character: "; $char = <>; chomp $char; } print "The number of a is $count\n"; print "done";