foreach my $word (@word) { if ($word =~ m/^[A-Z]/) { if ($word[0] ne "[Sidenote:") { $name = $word[0]." ".$word[1];