|We don't bite newbies here... much|
Honestly, I did not see any advantage to using PHP. I have read that PHP has a better interface than CGI but I could not really tell.
There were two reasons for selecting PHP. The first is that being new to mySQL, the book "Head First PHP and mySQL" was an excellent tutorial on mySQL and PHP seems to integrate well. PHP seemed very C-like and Perl so picking up the language was not difficult.
Second, with so much talk about PHP, I felt that learning some PHP could only help my resume.
Comparing PHP to Perl, I can state the following: 1. The raw parsing power of Perl is unmatched. 2. The lack of an equivalent STRICT for variable declarations results in numerous debugging headaches. How can one build a robust application without having a strongly typed language? 3. Perl's variable declarations prefixes are so nice as they allow you to spot a scalar from an array from a hash. 4. Hashes are more straightforward. 5. Pointers/References ... No serious programming can be done without pointers, and PHP's roundabout use of pointers is not friendly.
Of course, I am still learning about PHP and it does have a huge libary of functions. But the CPAN library is still unmatched.
Now my backend for the mySQL database was done in Perl Almighty. There was a total of some 4200 NCL lines of code encompassing some 25 modules. The 25 modules were built into a single executable using ActiveState. My application FTP's into some 15 sites collecting information continuously. And Perl does a great job at FTPing! What a breeze to drop my application on multiple machines with none having Perl installed on them.
The Perl DBI is first class. PHP seems to have copied the Perl DBI.
I used caller() for my first time to help point out exactly where errors occured. My error_log_file - thanks to caller() - has been of such enormous help.
My standalone tools in Perl have put many an engineer in shock and awe after seeing how Perl tools have shaved hundreds and hundreds of hours of manual labor from their work. Quite a few engineers around me have purchased Perl books after witnessing the speed with which I relieved them of their headaces. Of course, many give up quickly because without a strong software foundation, you can only do so much.
It would been a nightmare to replicate this effort with PHP.
After working for some 10 years with Perl, I still have to see a language that can match Perl's power. I have looked at Python briefly and did not like it. TCL is archaic. In the past 5 years, I have written over 60,000 lines of NCL code with it. Perl 5.10 has really made this language better. Having a SWITCH statement with SMART_MATCHING is great. But hash references are probably the most powerful thing in this language after regular expressions.
Even if TIOBE is right as to number of users, that does not make Perl a second class language.