Last week I was surfing Webmaster World and came upon a thread where a member was curious as to which programming language was the most popular Internet duct tape at the time. I use both of these languages almost daily and I can say without question that they are both very useful in their own right. I use each language whenever I'm performing particular tasks and sometimes I have php programs that call perl backends for web based programs.PERL is also essential to all my daemons on my unix boxes. Without PERL I'd have alot of maintenance to do all the time and would probably never sleep.
When is PERL best?
PERL is best used for me when I do some sort of aggressive regular expressions parsing or low level socket programming coupled with multithreading. For example if I have to tear apart thousands of lines of data per second I use perl. If I have a system that has to handle bulk data then I use perl.
When is PHP best?
Anytime you're working on Internet User interactive software systems php is the animal of choice. PHP allows you to couple programmed functionality into your webpages without the user seeing any of the underlying technology. PHP brings webpages to life in ways that would require massive headaches in perl via very few lines of code. Many times it actually seems too easy. Writing forms, creating a better user experience? use PHP.
Which is easier to use?
PHP is probably easier to use for the beginning programmer. Its rewarding in that basic functions will allow spectacular results in a browser from a programmers point of view. PERL is also a bitch when it comes to installing and updating modules if you're not an administrator type. Sometimes its almost impossible to get the packages you want.