in reply to input record separator help

just for counting the number of occurences of the letter "A" I would leave the input record separator alone. Try:

$count_A = ( $line =~ tr /A// , "\n" )

Sören