#!/bin/perl
##################################################
# Count the Frequence of nucleotides in a 
# file containing a multi-line input sequence.
# This requires an introduction to scalar operations,
# conditional expressions, and iteration. 
##################################################

# Initalization
$countA = 0;
$countC = 0;
$countG = 0;
$countT = 0;
$curPos = 0;

## Store the entire nt sequence from the multi-line file in $DNA
$input = <STDIN>;
chomp($input);

$DNA = $input;
$numNts = length($DNA);

## Count the nts
###### START YOUR CHANGES HERE ######

while (    ) {
} # End of while loop

###### END YOUR CHANGES HERE ######

## Print Results
print "The sequence contains $numNts nucleotides.\n";
print "Percentage of A's: ", ($countA/$numNts) * 100, "%\n";
print "Percentage of C's: ", ($countC/$numNts) * 100, "%\n";
print "Percentage of G's: ", ($countG/$numNts) * 100, "%\n";
print "Percentage of T's: ", ($countT/$numNts) * 100, "%\n";

exit;                    # End program
