open (LOG, "$calog") or die "Can't open $calog: $!\n"; while ($line = ){ if ($line =~ /\'([\w.]+)\' added/) { push(@certs, $1); } }