$|=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 $e (@arr){
  $dna = $dna . $e; # concatenate the lines into a single string
}

$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";
