$|=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: $!";
}

<IN>; # read the first line, but don't save it (so skip it!)
$dna = <IN>; # read the DNA sequence
close IN; # We're done and don't need the input file anymore

chomp $dna; # get rid of the return at the end of the sequence

$motif = "ACCTGT";
$p = index $dna,$motif; # get index of first motif
$p = $p + 1; # people like counting starting from 1 not 0

print "$motif found at position $p";
