in reply to LDAP Search Script runs slow
One potential trouble is that your perl script is a CGI script. Everytime somebody uses your script, the file is opened, perl is launched, your script is compiled and then run.
The chances are good that the php version is running through mod_php. Php is is always running and does not deal with the overhead of startup every time the Php script is run.
You can do as well or better with mod_perl