LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 10-14-2008, 01:41 PM   #1
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Rep: Reputation: 33
Perl Vs python


Hi everyone,


Can some please tell me advantages and disadvantages of both.


Thanks.
 
Old 10-14-2008, 01:52 PM   #2
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
I heavily recommend Googling this for a few days - people have been shot for asking this question. *just joking*

One of the problems with your question, though, is that advantages and disadvantages are subjective to each person. Mine are as follows:

+Python: Uniform syntax
+Python: Easy
+Python: Relatively large library support
-Python: Makes you lazy
-Python: Due to its easy syntax, you may find you want to kill yourself to alleviate the boredom

+Perl: Wickedly powerful when it comes to parsing data
+Perl: Largest library support of any language (that is not C or C++)
-Perl: The syntax is the antithesis to Python's syntax uniformity
-Perl: Reading other people's code can make a root canal seem pleasant (read: next to no syntax uniformity)

Last edited by indienick; 10-14-2008 at 01:53 PM.
 
Old 10-14-2008, 02:23 PM   #3
sambuca
LQ Newbie
 
Registered: Oct 2008
Distribution: Suse, Ubuntu
Posts: 13

Rep: Reputation: 0
So, which is more used in Linux? Perl?
 
Old 10-14-2008, 02:56 PM   #4
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Both are used equally as much. If you want empirical data, though, look at SourceForge and FreshMeat, and get a count of how many of these projects use Perl, and how many use Python.
 
Old 10-14-2008, 07:18 PM   #5
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5
Posts: 16,086

Rep: Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995
You should prob try the basics of both. They are both heavily used.
As mentioned Perl has a much larger 'library' of pre-written modules (search.cpan.org) and has been around longer.
For Perl you could look at
http://perldoc.perl.org/index.html
http://www.perlmonks.org/?node=Tutorials

somebody else will point you at the Python equivalents.
 
Old 10-15-2008, 02:48 AM   #6
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 3,860

Rep: Reputation: 768Reputation: 768Reputation: 768Reputation: 768Reputation: 768Reputation: 768Reputation: 768
Quote:
Originally Posted by sambuca View Post
So, which is more used in Linux? Perl?
Why is this a useful question; not which is better for a particular job, but which is more popular.

My feeling is that if you try both, you'll probably find that you like one and hate the other (more or less). Would that solve your problem for you, or is there something specific that you want to know?
 
Old 10-15-2008, 11:06 AM   #7
mabin
LQ Newbie
 
Registered: Oct 2008
Posts: 15

Rep: Reputation: 0
Basically perl is a beast. But for a beginner its always better to think abt python, it is in no way weaker than perl. If you are planning to develop an attitude towards coding in linux then I will suggest you to go for python. Coz perl may coz you to run away from that intrest lol
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl and Python raghuveerbabu Programming 10 08-24-2007 08:45 AM
perl vs python yenonn Programming 6 08-01-2006 05:44 AM
Perl or Python JJX Programming 4 04-17-2006 02:42 PM
Perl or Python JJX Programming 6 10-27-2004 03:58 AM
Perl or Python ! linuxlover1 Programming 13 04-19-2004 07:33 AM


All times are GMT -5. The time now is 07:15 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration