Or, even more Perl-ish, with a bit less extra work (e.g. only one //g loop):
use Term::ANSIColor;
open(READ,"<dna.txt");
$m = 'AGGGGG';
$_ = do { local $/; <READ> }; # read whole file
s/\s+//g; # remove blanks
s{$m}{ # search the string
push @c, 1 - length($m) + pos; # remember position
color('bold green').$m.color('reset'); # remember to reset!
}eg;
print "$_\n"; # print transformed string
print "NUMBER OF SITES THE MOTIF ($m) IS PRESENT: ".@c."\n";
print "AND THE POSITION IN THE STRING IS:", join(',', @c), "\n\n";