
undef $/;
open(F,"/mach_kernel");
$seq = <F>; close(F);
$/ = '\n';
print STDERR "length ",length($seq),"\n";

if($ARGV[0] eq 'a') {
$count = 0;
for ($i = 0; $i < length($seq); $i++) {
    $count++ if substr($seq,$i,1) eq "G" || substr($seq,$i,1) eq "C";
}
print STDERR "a $count ",time()-$time,"\n"; $time = time();
}elsif($ARGV[0] eq 'b') {
$count = 0;
for ($i = 0; $i < length($seq); $i++) {
    $count++ if substr($seq,$i,1) =~ /[GC]/o;
}
print STDERR "b $count ",time()-$time,"\n"; $time = time();
}elsif($ARGV[0] eq 'c') {
$count = 0;
$count++ while($seq =~ /[GC]/og);
print STDERR "c $count ",time()-$time,"\n"; $time = time();
}

