$paragraph = "This is a group of words. It mentions people like Joe Smith and Jill Doe who work at Aerodyne Laboratories, INC. The facility is located in Springfield, MA and is famous for it's llamas, lizards and Gork the giant robot."; @text = split(/\.[\s]*/,$paragraph); foreach $line(@text){ $line = lcfirst($line); $line =~ s/[A-Z][a-z]+/XXXXX/g; $line = ucfirst($line); } print join ". ", @text; #### This is a group of words. It mentions people like XXXXX XXXXX and XXXXX XXXXX who work at XXXXX XXXXX, INC. The facility is located in XXXXX, MA and is famous for it's llamas, lizards and XXXXX the giant robot.