PHP was its own, independent effort. It doesn't really have anything to do with Perl. People migrated to it because it was easier to deploy (just put it on the web server), and probably easier to write for many people.
It doesn't NOW have anything to do with Perl... but it's pretty easy to see some of that history in the code.
You're right of course that there are some things that were borrowed.