LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-17-2006, 09:18 AM   #1
JJX
Member
 
Registered: Mar 2004
Location: Greece
Distribution: Debian
Posts: 351

Rep: Reputation: 31
Perl or Python


Which one is better/more familiar for creating general purpose scripts?

As i know, python is getting more and more famous last months...
Should i choose one or learn both?
 
Old 04-17-2006, 09:22 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
perl looks a lot more conventional, but they are just about level in terms of functionality and power.
 
Old 04-17-2006, 10:05 AM   #3
bardinjw
Member
 
Registered: Apr 2003
Location: boston
Distribution: ubuntu debian redhat fedora
Posts: 108

Rep: Reputation: 15
learn both (at least get familiar with both), then decide.

personally, i think perl is easier for some quick and dirty scrips. Many things are assumed for you by the interpreter, and a lot of input/output "just works".
i use python most of the time though. i like the language as whole more then perl. The language lends itself to better code structure and readability. Not that you can't do that in perl, but perl will let you be a lot sloppier.
 
Old 04-17-2006, 02:20 PM   #4
werdnA
LQ Newbie
 
Registered: Jul 2005
Location: Iowa
Distribution: Fedora/Suse
Posts: 2

Rep: Reputation: 0
Python vs Perl

I have been using Perl for about 7 years but decided about 6 months ago to give Python a shot. I must say that I am really digging Python. If you are starting from scratch I would highly recommend Python. Perl certainly does the job but as a previous poster remarked Python seems to produce much cleaner code, especially for larger projects.

I still fall back into Perl mode if I just want to write a quick 3 liner. For anything that I plan to grow and have organized I am switching over to Python. If you have the time it can't hurt to know both of course but you might as well concentrate on one to begin with.
 
Old 04-17-2006, 02:42 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
clean in a very arbitrary way. i have problems with any code where the amount of whitespace on each line matters. yuerghhh
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Python or Perl drdroid Programming 29 12-22-2006 09:54 AM
Python or Perl? Boby Programming 2 06-12-2005 10:54 AM
Help installing perl and python. Tuul Programming 4 11-01-2004 01:51 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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:13 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration