The character name Perry Mason was lifted from a children's magazine
"Perry Mason" came from the same place as the "Pledge of Allegiance." It does have a better ring to it than "Ken Corning."
In 1923, a California lawyer named Erle Stanley Gardner saw his first story published. Frankly, Gardner was rather bored with his legal practice in the town of Merced. He devoted himself to writing fiction for the pulps. But the budding author would not leave the law behind entirely.
Gardner dreamt up a character for his tales, a righteous lawyer with the sharp mind of a sleuth. You know his type quite well. His name was… Ken Corning?
The Ken Corning character appeared in the pages of Black Mask, the pulp magazine of "Smashing Detective Stories" that also serialized Dashiell Hammett's The Maltese Falcon. Corning cracked cases like "Honest Money," "Blackmail with Lead," and "Devil's Fire."
The final Ken Corning tale hit stands in 1933. That same year, Gardner evolved his sleuth-lawyer character into a new persona that would make his debut in The Case of the Velvet Claws.
Gardner needed a new name for his creation. This time, he turned to one of his favorite childhood magazines for inspiration.
The Youth's Companion was the Highlights, Boys' Life and Teen Vogue of the late 19th century. The character-building periodical featured big-name writers such as Mark Twain, Harriet Beecher Stowe and Jack London. The magazine might be most famous for first printing the "Pledge of Allegiance," written by Francis Bellamy. Eventually, it would merge with another wholesome rag called The American Boy.
Gardner likely first encountered The Youth's Companion as a child growing up in Massachusetts. For The Youth's Companion was published out of Boston. And the enterprise that published this magazine? Well, that was the Perry Mason Company. The boss, Perry Mason, founded the magazine himself in 1827.
The prose within those pages must have made quite an impression on young Gardner, who would lift the publisher's name for his new crime-solving lawyer character in 1933.
So, yes, in a way, the "Pledge of Allegiance" and Perry Mason have the same origin.