#!/usr/bin/perl -w
use strict;
# Count nucleotides in input file

use Data::Dump qw/dump/;

my %count;

while ( my $DNA = <> ) {
	chomp( $DNA );

	warn "DNA: $DNA";

	my @nucleotides = split( //, $DNA );

	warn "nucleotides: ", dump( @nucleotides );

	foreach my $nucleotide ( @nucleotides ) {
		$count{$nucleotide}++;
	}

}

warn "count: ", dump( \%count );

while ( my ($nucleotide,$total_number) = each %count )
{
	print "$nucleotide = $total_number\n";
}
