$|=1; # So it works in the Open Perl IDE

if (!open IN,"<big.fas") {      # make sure we can read the file
  die "Couldn't open file: $!";
}

@arr = <IN>; # read the whole thing into an array
close IN; # We're done and don't need the input file anymore
shift @arr; # get rid of the head
chomp @arr; # get rid of the returns at the end of the lines

foreach $line (@arr){
  $dna .= $line; # concatenate the lines into a single string
}

$dna =~ tr/ACGT/tgca/; # transliterate to lower-case
$rev = reverse $dna; # Get the reverse

$gc = $rev =~ tr/gc//; # Make an empty transliteration. Make sure to use
                       # lower-case letters!
$len = length $rev; # get the length of the full sequence

$gcper = 100 * $gc / $len; # Get the percentage

print "Reverse complement of the sequence:\n$rev\n";
print "GC-content: $gcper%";
