
|
View Full Version : php vs. perl
DjPaj 02-08-2002, 04:10 PM Does anyone out there actually have a "job" where you work with PHP all day?
I mean I know that PHP is a strong web language, and I love it, I can't get enough of it, but everywhere I look for web designer jobs, it asks for PERL.
I currently work with a company and I have no offical web designers title, but they know I go to school for computers and they asked me to create some web-enabled databases. At first the IT guy wanted me to use PERL, he had never heard of PHP, but once I showed him PHP, he installed it and let me work with PHP.
Is PHP not an industry standard language, I mean I see alot of websites built in php, but no jobs out there asking for it, is that just because PHP is easy to learn and is expected of people to know, where as PERL is a little more complex to understand and learn?
northernscum 02-08-2002, 05:05 PM PHP suffers from the same stigma that all open-source technologies do to some extent -- that is, free stuff isn't as good as stuff that costs money.
Having said that, PHP vs. Perl isn't a fair comparison. PHP was conceived and built as a means to create dynamic web pages. Perl, on the other hand, is a general-purpose language that one can apply to just about any situation (web, networking, GUIs). The thing is literally glue.
Perl's versatilty, as well as it's maturity, is likely the primary reason why it's more common in job listings.
serve-you 02-08-2002, 07:24 PM Originally posted by northernscum
PHP suffers from the same stigma that all open-source technologies do to some extent -- that is, free stuff isn't as good as stuff that costs money.
Having said that, PHP vs. Perl isn't a fair comparison. PHP was conceived and built as a means to create dynamic web pages. Perl, on the other hand, is a general-purpose language that one can apply to just about any situation (web, networking, GUIs). The thing is literally glue.
Both languages are free for all to use. Where does the cost issue come into play? Personally, I'll pay for a program written in PHP before over the same program written in perl anyday.
PHP combines the best elements of perl & html amongst other lanquages. I have yet to find a perl script that could not be done in PHP. I think it is a very good comparison for just that reason.
-Dan
northernscum 02-08-2002, 07:55 PM Obviously, there is no cost issue when comparing PHP and Perl. The original poster bemoaned the lack of jobs requiring PHP and my first statement addressed that.
I'm not interested in discussing whether one is better than the other. As I already mentioned, the two languages are on completely different levels. It's like trying to compare a ginsu with a swiss army knife.
If you honestly believe PHP can do everything Perl can, I'd venture to guess your experience is rather limited with one or the other.
serve-you 02-08-2002, 08:09 PM I am not trying to say one language is better than the other either. They both have their places, but when it comes to web apps, I think PHP is stronger. Last time I looked, the topic here was php vs. perl, and the jobs referred to here were design postitions, not programmers.
-Dan
dapperdan 02-08-2002, 10:03 PM Speaking from my experience, I have taught myself PHP programming in a relatively short amount of time. I attempted to learn PERL, but it does not fit into my brain as easily as PHP. The learning curve for PHP is much shorter, at least for me.
Perl has some drawbacks, as far as processor consumption, compared with PHP. So, I believe that in due course, PERL will be replaced by PHP as the dominant language, at least for web development.
northernscum 02-09-2002, 02:48 AM Originally posted by serve-you
They both have their places, but when it comes to web apps, I think PHP is stronger.
-Dan
You know, that's super. And I'd agree, PHP is a stronger platform for web apps.
This, however, does not address the poster's original question, that is: why are employers looking for Perl, rather than PHP skills. I offered a theory (Perl's versatility, maturity) -- something, incidentally, you have yet to do yourself.
So rather than call a Jihad, why not offer a theory of your own? If you believe PHP is such a superior web programming language, why are there more Perl jobs out there?
Focus, people.
cheesysticks 02-09-2002, 03:41 AM Just done a quick search through a fresh linux install. Putting aside c for a second what other languages are used very heavly to help maintain / run the server???
Internal perl files = 600 odd, php files = erm... a couple that I put there, oh yeah, there for server pages. Have you seen how many packages use perl to install themselves? have you seen how many libraries there are for perl?
Php will have to get some serious backend development done to compete perl, and it will have to prove itself reliably secure against an already established language that has had a whole lot of money invested in it.
Php needs distributed library features and needs to be fully modularised to fulfill the task of perl, so why not just use in perl.
They both do different things and meet in the middle - /httpd/
Therefore I submit that php is mainly a frontend (pretty web site) language whilst perl is the de-facto internal/backend (THE BIG ONE) system, that also does a bit of front end, because it can...
Natuarly people get paid more for backend programming than making websites, thats why I think companies ask for perl, it has a big reputation for doing the biz, as opposed to delivering the biz.
If im wrong put me right!:D
Tim Greer 02-09-2002, 06:23 AM At the sake of sounding flamish, Perl is just far better, more powerful and versatile. PHP has limits, it has built-in functions, and whatnot. PHP is cool, but it's not even close to Perl. As for the PHP is better for web development, that's just an opinion. Firstly, Perl can use an Apache module, just like PHP, so it can run just as efficiently and save the overhead of CGI -- keeping in mind that CGI and Perl are not the same thing. In fact, you can use something like mod_perl to actually code an Apache module that is equally as efficient and feature-filled as PHP (of course, that would take a while and be stupid, unless it was for a good reason and something custom). Perl makes use of so many modules, that it can be just as easy to implement in HTML -- in fact, they already have that. In fact furthermore, PHP is basically C and Perl syntax for a lot of the part and you can use one or both to code the PHP script -- of course then you have the limits PHP imposes. PHP has no advantage in my book. If you are learning or find PHP easier, go for it, there's nothing wrong with it. My argument, is that if you want the most efficient and dynamic language, you'd likely be using C anyway, next would be Perl.
I honestly don't know why PHP is such a big deal and the reason why a lot of people want developers that know Perl, means that they are more likely to understand lower level languages, multiple interfaces, permissions and more, as compared to someone that believes that PHP is great for the web and thinks it's the best thing out there. Now, that's not to say that only a fool would like or use PHP, but if someone's learned Perl and PHP both well, they will likely choose Perl. Some things can be faster to code in PHP, sure, some are faster in Perl, but Perl is far more powerful and dynamic. Honestly, if you know Perl well at all, you'll know that PHP is rarely any faster or better for web development, and that Perl has everything PHP does and a lot more -- PHP has nothing Perl doesn't, and I don't expect someone that doesn't know Perl to understand this. Perl has what could be almost compared to as "everything" or at least "a plethora" more than PHP. Anyone that claims otherwise, does not know Perl well enough. The question here is basically this then; Why Perl over PHP? Well, most of the time, PHP is a fine choice and for most things, there's no reason to learn Perl, unless you want to delve into a language that offers more... but for most people's needs and desires in programming, that's not usually needed, unfortunately. Perl is also known for being better for system level tasks, and a good replacement for shell scripts.
Again, if you want the best for the fastest, most robust, efficient and dynamic language with no barriers at all, learn C or better yet learn assembly. In my experience (being a programmer and system administrator for over 8 years), I'd say there's plenty of reasons to choose an employee that knows Perl over PHP, just as a lot of people prefer a C programmer over a Perl programmer. I know hearing this upsets a lot of people, and people sometimes get the impression that I'm saying this because some people don't agree, but these are facts. I would definitely say though, that for most things, it would be ridiculous for someone to go and try an learn Perl, if they don't think they'd ever use it, just for the sake of using it and having the ability to use it for the reasons why some of us do. Don't be fooled into thinking PHP is better than Perl for anything though, because if you knew Perl, you'd have no reason to state that. The question is, is if it's reasonable to learn Perl for that reason and I don't think it is for most people. I have a lot of issues about PHP that I do not like, but I won't get into those here, but I'm definitely more for Perl, as you can tell. Well, that it for what you will, I'm not trying to convert anyone.
Walter 02-09-2002, 06:28 AM Originally posted by Tim_Greer
Again, if you want the best for the fastest, most robust, efficient and dynamic language with no barriers at all, learn C or better yet learn assembly. In my experience (being a programmer and system administrator for over 8 years), I'd say there's plenty of reasons to choose an employee that knows Perl over PHP, just as a lot of people prefer a C programmer over a Perl programmer.
If you know a lot of different languages you can choose the one you think is best for a specific task. I don't think any language is superior to another one. There are reasons to code in assembly but I wouldn't want to program a major task with it :) C is powerful but it takes more time. And C++ is a different thing at all...
Tim Greer 02-09-2002, 06:38 AM Originally posted by Walter
If you know a lot of different languages you can choose the one you think is best for a specific task. I don't think any language is superior to another one. There are reasons to code in assembly but I wouldn't want to program a major task with it :) C is powerful but it takes more time. And C++ is a different thing at all...
True that it's up to the person, as long as the language can accomplish the task just as well, or well enough to not pose issues. After all, I'm not saying PHP isn't good for anything, or that I am even opposed (or haven't) used it myself, because I have, there's no reason not to sometimes. I like knowing all the languages I can that are popular, after all I have many books on ASP even. But it's a fact that some languages are better than other's. True that you can choose what one's best for the task -- assuming you know more than one. However, if given a choice of one over the other, I know that while one can accomplish any task given, the other is far from being able to do that. few people program things that require any real complex or intricate functions, so PHP, or even ASP (what I compare PHP to, I see it as basically the sam thing with the same draw backs -- I see it as a play language and not for serious programs), that either will serve the purpose, until you hit a wall or need something more. However, PHP is advancing, unlike ASP ever did or could, so I don't think of them in the exact same terms, but I sometimes feel like I have to justify why C is a better choice in comparison to QBasic. It's more than just an opinion, is what I mean, that one is better. There, I win, now let's move onto another thread! :-)
Walter 02-09-2002, 09:17 AM Originally posted by Tim_Greer
I sometimes feel like I have to justify why C is a better choice in comparison to QBasic.
Oh lord! Let's start a language flame war! :cool:
No, not really.
Tim Greer 02-09-2002, 09:27 AM Originally posted by Walter
Oh lord! Let's start a language flame war! :cool:
No, not really.
Awww, maaaan! That's no fun! It's because you code in Qbasic, isn't it? Yeah, me too.
Walter 02-09-2002, 09:35 AM *argl*
About 16 years ago I programmed in Qbasic - do you want to tell me your are that behind me?
Tim Greer 02-09-2002, 09:49 AM Originally posted by Walter
*argl*
About 16 years ago I programmed in Qbasic - do you want to tell me your are that behind me?
Ha, so you admit it! Yeah, whatever, you COBOL USER!
Wow, Qbasic, I think I was using that back in.. geezz... Now I'm having flashes of Atari 400's and up... I was about 8 years ahead of you, pal. *L* I was a geek way back in '78 or so (but I stopped in about '86 and didn't get back into it until about '94 or '95), when they came out with the first Atari systems that had the "programming cartriges". Weird to think about. Of course, the TSR-80's and such. hey, I don't want to bring this way off topic. I have an old, old post here archived where I mentioned all about this stuff and put links to the old Atari systems I used to own (not my own, but the same systems). Big old cassette tape drives, etc. It was a hoot. I'll stop ranting now.
PS: Perl is better.
priyadi 02-09-2002, 11:15 AM I personally know PHP first, then I learned about Perl. PHP is much easier to learn, but Perl is more versatile. You can program almost anything in Perl. PHP is better if all you do is web programming, but if you know Perl, you can use Perl to do web programming as well as other task. :)
I can understand if Perl is more popular in job search. If you can program in Perl, then you can understand PHP easily.
muppie 02-09-2002, 12:01 PM My first language was c++, then I moved on to use delphi, then I learned a bit of ASP only to dump it and use PHP... now I want to learn Perl.
I can't agree more with what Tim said before :) - People who know perl tend to be more cluey and more knowledgeable than just some php monkey.
now I've said enough.. I must hide and take cover... :D
Walter 02-09-2002, 12:49 PM Originally posted by Tim_Greer
Ha, so you admit it! Yeah, whatever, you COBOL USER!
PS: Perl is better.
No, no, Perl is not better, because it's not available on those pretty Sinclair ZX-81 computers with that "keyboard". *lol*
And con't call me a cobol user! :angry:
PS: Do you always want to have the last word?
muppie 02-09-2002, 12:58 PM Originally posted by Walter
And con't call me a cobol user! :angry: Are you a cobol programmer? ;)
Walter 02-09-2002, 01:08 PM Originally posted by muppie
Are you a cobol programmer? ;)
Of course no!
I am 34 years old, not 3400.
cheesysticks 02-09-2002, 02:41 PM Since you mention ZX81 ???
Thanks to Clive Sinclair I taught myself manual hex-dec conversion... yawn, had to do that because it was useless for anything else as the box cut out every time I moved it due to the rampack moving.
COBAL, did you know that it is still used? not for making web pages or server stuff but real apps.
I was once asked to help out in converting raw plotted data from COBAL output to charts, the subject was the fluid dynamics for the cooling system inside a fast arg reactor and how to analyse the cooling rod efficency if a rod or rod set/bank fails, now thats a REAL app, that was 10 years ago, I think it is still being used for this purpose as its mathematical power has been proven. The lab had about 200 sun machines / PCs and one standalone COBAL machine.
Even the old old languages are still being used for very specialised programming that many "web" programmers would not even know exist. Cobal is a lot more powerfull than many people would ever believe.
Personaly I preffer LISP or fortran, but respect goes to the COBAL programmers, long before the perl or php programmers.
Compaired to COBAL both perl and php are script kiddie stuff! But, they all do fulfill there own specific tasks very well.
MIX = 1009. Now there's an cool language - 1969, understand about MIX then COBAL, then you can use COBAL for some realy hard maths...
Perspective please gents, perspective!
There is "real" maths programming and there's web programming.
COBAL programmers still do exist, only most of the stuff is so high up in research no one gets to hear about them.
COMMENCE SLAGGING / FLAMES HERE!
Walter 02-09-2002, 02:50 PM Never heard about COBAL. :dgrin:
cheesysticks 02-09-2002, 02:55 PM hehehehehe:D :D :D :D
Walter 02-09-2002, 03:05 PM Come on!
Is there really a COBAL or do you mean COBOL?
cheesysticks 02-09-2002, 03:12 PM Yep, COBOL.
What a clutz i am!
cheesysticks 02-09-2002, 03:14 PM sorry, guys my dyslexcsia always catches me by surprize...
Tim Greer 02-09-2002, 09:19 PM Yeah, there's a lot of languages that are still used tody, both old and new... and, speaking of new, and to further go off topic, what's anyone's opinion on Ruby? I've never used it. I heard about it and checked out the site and it looks very easy and hauntingly familiar, but I just have no idea why they'd create another language, when it just looks like the rest? Has anyone used Ruby? Oh, and let's not forget about ADA, etc. Hey, do you think anyone using the 'B' language anymore? heh.
muppie 02-09-2002, 10:39 PM Programming language that we use every day such as C, Pascal, php, and to some extent, Perl are pretty limited. Computer scientists are always looking into bringing computer languages into a higher semantic that interface with the programmer in an approach the way human thinks, and not forcing human to think like a low level machine.
Apart from that, there are languages that improves on other aspects such as the concept of design by contract which is embraced by Eiffel, iContract for Java.
You might also be interested in functional language and many more. I am glad there are many new languages and ideas being born. It means I won't ever be bored just coz I know c++ or perl or java.
I would definitely take a look at Ruby when I have some time.
One of these days we can program the computer by telling it WHAT we want, and not HOW to do it ;)
cheesysticks 02-09-2002, 10:47 PM Ruby, I think it will eventualy be integrated into a lot of server systems, multithreaded regardless of platform, OO, C extensions, and kind of an different ADA system from what I understand..
As for ADA, is ADA is a realy popular language, especialy when used with GNAT for real-time, embedded, apps, but does it not have some O/S limitations for the "high end" type apps, Solaris being the O/S whilst Ruby is any O/S?
the "B" language! I bet someone is using it somewhere just to show off! The space the hardware takes up :D :D :D
http://histoire.info.online.fr/images/pdp11-unix.jpeg
bitserve 02-10-2002, 12:31 AM PHP when embedded into an HTML document is not real different than PERL when embedded into an HTML document with Embperl. I'd much rather use PERL, making PHP useless.
When using it as a CGI or program script, again I'd rather use PERL.
PERL wins, hands down.
IMHO. :)
Walter 02-10-2002, 03:41 AM Ok, to find out which is the ultimate language check out this link:
http://internet.ls-la.net/mirrors/99bottles/
I think the language Brainf**k will rule the world! It's simple, easy to remember and really, really nice!
cheesysticks 02-10-2002, 04:14 AM Brainf**k -
I think im gona piss my pants im laughing so much!
Pure dead brilliant linkage!
Tim Greer 02-10-2002, 04:42 AM Originally posted by Walter
Ok, to find out which is the ultimate language check out this link:
http://internet.ls-la.net/mirrors/99bottles/
I'm not going to be able sleep well...
Walter 02-10-2002, 05:30 AM Originally posted by Tim_Greer
I'm not going to be able sleep well...
Why?
Do you already learn the new language? I think Brainf**k is far more powerful than perl!
cheesysticks 02-10-2002, 05:45 AM Guess what I found then.....:D
http://www.muppetlabs.com/~breadbox/software/tiny/bf.asm.txt
Tim Greer 02-10-2002, 05:57 AM Originally posted by Walter
Why?
Do you already learn the new language? I think Brainf**k is far more powerful than perl!
It just didn't sit well... *L* Seriously, that's very cool. It put my head in a spin.. too much information.. too much I don't know, all from a simple thing. I'm not comfortable with that. *L*
'El-bookmarko!
Walter 02-10-2002, 05:59 AM BTW, when will HostGui support Brainf**k?
Tim Greer 02-10-2002, 06:04 AM Originally posted by Walter
BTW, when will HostGui support Brainf**k?
Hej,
Just as soon as I g****h, which will then I'll be sure to h***j.
cheesysticks 02-10-2002, 06:41 AM Walter, I have got to say it,
thanks for that superb link!
I always thought Brainf**k was a joke, sure I have heard folk mention it in the passing but wow!
I guess Im just realy impressed! and re-enlightened! Again...:D
nuclei 02-10-2002, 08:45 PM Heh, I think we all know where I stand on this one :P
DjPaj 02-11-2002, 11:37 AM Whoa, look at the thread I started, all with one simple little question. Both sides of the arguements were well supported, me myself, I was taught PHP first, then PERL, so naturally I like PHP better, once you do regular expressions in PHP and then try one in PERL, whoa boy what a difference.
Anyway, for what I do and what I like to do PHP is fine with me, haven't had any reason to move to PERL yet, front end and back end, PHP has worked for me, database connectivity and data transfer, PHP has also worked fine for me, I think the difference is just a personal preference.
Anyone for JSP? :D
allan 02-11-2002, 12:26 PM Originally posted by Tim_Greer
...but I sometimes feel like I have to justify why C is a better choice in comparison to QBasic.
QBasic? Is that the one where you have to jump from square to sqare to reach the top of the pyramid :D?
mahinder 02-11-2002, 01:56 PM hi people,
I use to program in ansi C under MS-DOS and DOS shell, haven't tried it running on Linux platform, but suppose if I want to run those programs on Linux system how do I go about it. :rolleyes:
I was checking gcc compiler but don't know weather program written for ansi c (Borland compiler) will run on Linux system ?
:confused:
anyway, how the one can run and creates C and C++ programs on red hat Linux ?. can some one forward me to some good links and tutorials. :)
hey Tim, your posts are very informative as always. cheers.
:beer:
priyadi 02-12-2002, 08:07 AM Originally posted by mahinder
hi people,
I use to program in ansi C under MS-DOS and DOS shell, haven't tried it running on Linux platform, but suppose if I want to run those programs on Linux system how do I go about it. :rolleyes:
I was checking gcc compiler but don't know weather program written for ansi c (Borland compiler) will run on Linux system ?
:confused:
anyway, how the one can run and creates C and C++ programs on red hat Linux ?. can some one forward me to some good links and tutorials. :)
hey Tim, your posts are very informative as always. cheers.
:beer:
AFAIK, Borland compilers for DOS while ANSI compatible, also contain a LOT of non ANSI extensions. Combine this with the limitation of DOS itself, it is hard to program in that without using any non ANSI extension, you need to refer to the documentation for functions that's not defined in ANSI. And without those extensions it is even harder to make anything useful and easy to use.
muppie 02-12-2002, 08:22 AM Grab a book on programming in unix, start writing simple stuff using gcc and you're on your way.
|