
while (<>) {
  # ^ here means `only at the beginning'.
  if ($_ =~ /^c.t/) {
    print "That matches.\n";
  }
}

