The Lizard Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsCommunityThe Lizard Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 16th, 2003, 04:44 PM
datamark datamark is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 3 datamark User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PHP vs Perl

Hello, excuse me for not understanding this but what is the difference between PHP & Perl?
Reason I am asking is that I am trying to learn about website hosting so I am trying to learn as much as possible about it.
Thank you

Reply With Quote
  #2  
Old March 16th, 2003, 06:18 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Perl and PHP are both server side web languages. They process 'server side' to generate client side code (html and javascript. etc)

The main difference is the language structure and function names, etc

I dont have too much experience with perl, but as an example to create a working contact form in perl would take up to 400 lines of code. The same in php would be about 50 or less lines of code. Hence why php is more popular then perl at the moment.

Reply With Quote
  #3  
Old March 20th, 2003, 12:54 PM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 653 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 34 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
IMHO PHP Is also alot easier to script in also.

One advantage of PERL however is that it is compiled the first time it is accessed, and doesn't need to be recreated each time the page is accessed, which reduces some server loads. That is one of the reasons why people tend to like perl.

If you're wanting something like that also, you can run PHP as a CGI.. But Ben is right, it is quite a bit easier to write something in PHP as it is to write the same thing in PERL.. My registration script is about 8 lines of inputting data into the database and adding them to the mail server, as opposed to the perl script which is about 60 lines to do the same thing..

Reply With Quote
  #4  
Old March 31st, 2003, 02:38 PM
artypants artypants is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: san francisco
Posts: 1 artypants User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PHP vs Perl

PHP is easier to learn, read and code for Web pages- especially database driven ones. So, if you're just concerned with the Web, stick with PHP.

Perl is more versitle for scripting within the unix environment and integration with 3rd party applications. It's the language of choice for system administrators.

Reply With Quote
  #5  
Old April 6th, 2003, 08:58 PM
bo0 bo0 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 10 bo0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to bo0
yea.. i know both php and perl...

for my purposes (im a webhead) php is better... and faster with intergration directly into the apache server...

perl is an interpreted language by the way, it doesn't get compiled into binaries, usually anyway.. it can be done im told..

as far as your registration/contact form scripts go... i don't know what your talking about... those simple scripts can be done in practically the same amount of code... not in disparing number that you mention.

but perl is the system admins choice for a reason... it intergrates very very nicely with *nix...

the syntax of both php and perl are very very similar once you get past embedding php in html documents

Reply With Quote
  #6  
Old April 6th, 2003, 11:53 PM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 653 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 34 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
Quote:
Originally posted by bo0
yea.. i know both php and perl...

for my purposes (im a webhead) php is better... and faster with intergration directly into the apache server...

perl is an interpreted language by the way, it doesn't get compiled into binaries, usually anyway.. it can be done im told..

but perl is the system admins choice for a reason... it intergrates very very nicely with *nix...

the syntax of both php and perl are very very similar once you get past embedding php in html documents


You can compile perl, it runs pretty quickly too.. also it's quite easy to encrypt and protect your code with perl once it is compiled..

As for the syntax, not sure.. don't code in perl myself

Reply With Quote
  #7  
Old May 12th, 2003, 04:45 PM
Vince Vince is offline
LordNitrous
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: England
Posts: 137 Vince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
well in terms of scripts, I have found a lot of database problems with php's popular scripts but for the PERL one I havent any many problems. However PHP is far more powerful and there are better scripts out there.
__________________
You don't deserve to read my signature...yeah! That's it, keep walking...yeah walk away from me! That's it! Get out of my pub, you're barred!

Reply With Quote
  #8  
Old May 14th, 2003, 06:41 AM
visualdensity visualdensity is offline
Absolut Bummer
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Jungle
Posts: 51 visualdensity User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Hmm... maybe to really understand the differences between the two, we should also look at the most fundamental purpose of the two languages..

Quote:
PERL - Practical Extraction Report Language, actually began as a general-purpose language, designed to fill a niche in text-processing languages in Unix.

According to Larry Wall (the creator), "perl is optimized for scanning abritary text files, extracting information from those text files and printing reports based on that information. - Quoted from Perl: Developer's Dictionary (Pierce, 2002)


Quote:
As for PHP, according to PHP.net is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.


So... there we go... Perl initially was optimized for extracting information, whereas PHP was designed to solve web development problems. That's the reason why web developers are loving it now.

The reason why Perl was used to develop web applications was because at that time, web pages were static. So, programmers started extending the functionality of an HTTP server by writing a utility that ran separately from the web server, but acted as a slave to special processing requests from the server, making web pages more dynamic. And then they found perl to be really effective as a server side programming language. - Sourced from Javaserver Pages Application Development (Forta et al, 2000)

Hope that clears up a bit.. if any mistakes on what I said.. please forgive me
__________________


Reply With Quote
  #9  
Old May 14th, 2003, 05:08 PM
Vince Vince is offline
LordNitrous
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: England
Posts: 137 Vince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
so basically PERL, wasn't meant to be a web development language? But then again wasnt PHP born from Perl:

Quote from my PHP Book:

"PHP originally sttor for Personal Home Page and was created in 1994 by an independent i.t. contractor named Rasmus Lerdorf. This was simply a set of Perl scripts he wrote to track visitors to his website..."

Reply With Quote
  #10  
Old May 14th, 2003, 05:13 PM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 653 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 34 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
PERL is a web application development language... people use it for CGI work, authentication systems... ordering systems.. database work.. as well as a scripting language.. people used PERL and liked it so much because it was easy to write the program to work in both a shell environment as well as the web environment..

Reply With Quote
  #11  
Old May 14th, 2003, 05:15 PM
Vince Vince is offline
LordNitrous
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: England
Posts: 137 Vince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
oh right...PERL is cool but PHP is better because there are better scripts out there and resources to learn from, plus PHP will soon fade out when some new language comes in originated from PHP, like PHP was originated from PERL.

Reply With Quote
  #12  
Old May 14th, 2003, 05:17 PM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 653 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 34 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
Well.. what I can do in perl in 80 lines I can do in php with only 8, if even that many..

Reply With Quote
  #13  
Old May 14th, 2003, 06:32 PM
visualdensity visualdensity is offline
Absolut Bummer
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Jungle
Posts: 51 visualdensity User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Vince...

Quote:
Originally posted by Vince
so basically PERL, wasn't meant to be a web development language? But then again wasnt PHP born from Perl:



That's exactly it... PHP was on its own when it was born... that's the reason why it is disctinct in what it does, although Perl and PHP has some similarity..... but then again... there are similiarities in all programming languages...

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsCommunityThe Lizard Lounge > PHP vs Perl


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |