LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-23-2009, 09:01 PM   #1
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
is perl worth learning?


I find perl easy to learn because its like C syntax. is it worth learning?
 
Old 12-23-2009, 09:09 PM   #2
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Why don't you try it out since you say its easy for you . Perl definitely has its uses...same as any other languages.

Last edited by ghostdog74; 12-23-2009 at 09:10 PM.
 
Old 12-23-2009, 09:20 PM   #3
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
Google says yes but, what do you guys/girls say.
 
Old 12-23-2009, 09:48 PM   #4
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by smeezekitty View Post
Google says yes but, what do you guys/girls say.
it doesn't matter what we say. fans of Perl will say its worth it. haters of Perl would say otherwise. you need to find the answer to this yourself by actual hands on. so start with it already and stop wasting your time here.
 
1 members found this post helpful.
Old 12-23-2009, 09:53 PM   #5
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
Personally I've found Perl one of the most ridiculous main stream languages out there. However, it has its uses so if you are willing to invest the time then go for it. Basically any language is worth learning and Perl is worth it, it's just that me and Perl don't get on. I hope you have a more favourable experience.
 
Old 12-23-2009, 10:25 PM   #6
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
unless ( ) { } is neat. can be done in C also:
Code:
#define unless(x) if(!(x))
 
Old 12-23-2009, 11:14 PM   #7
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
During my last work experience, we wrote tools for customers, using Perl, to parse huge log files (gigabytes in size), of course among other things. I believe its original purpose was to be able to handle large amounts of text well, which it seems to be able to do. I think it has grown into a much more general purpose language with many other nice features/capabilities also. I remember sometimes I would be trying to debug some log files, but any text editor I had would freeze due to the filesize. I wrote up an extremely small script, in an extremely small amount of time, to split the log files to smaller ones that the editors could manage. So, needless to say, its also great at ad-hoc things like that.

As hinted at above, whether a language is "worth learning" or not is kind of subjective. The answers you get will likely be biased to that person's experience--or lack of--with the language. I, too, found it straightforward to learn (at least the syntax), because it is pretty forgiving, intuitive, and seems similar to combinations of other languages.

Alternatively, I could be cliché-ish and say its always a good idea to learn.
 
Old 12-24-2009, 01:57 PM   #8
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by smeezekitty View Post
I find perl easy to learn because its like C syntax. is it worth learning?
"C" syntax is the least relevant Perl feature. At all, your Perl scripts will look/function very poorly if you try to write in Perl like in "C". I.e. under the hood and in its mentality Perl is very different from "C".

And Perl is definitely worth learning. "C" with the help of LLVM folks is finally catching up - now "C" too has closures.
 
Old 12-24-2009, 03:23 PM   #9
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Only thing I can add to this: Use the tool that fits the job. The more tools you have (and know how to use) the easier the job gets. And, if important to you, it also increases your "market value".

Perl definitely has its values, creating reports to name one of the most obvious.
 
Old 12-24-2009, 04:09 PM   #10
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
I already wrote a perl script to seperate each file from the output of 'ls' and put a F: in front of it.
 
Old 12-24-2009, 06:47 PM   #11
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by smeezekitty View Post
I already wrote a perl script to seperate each file from the output of 'ls' and put a F: in front of it.
use glob, opendir()/readdir() , while(<*.*>) , etc instead of calling external ls. perldoc perlopentut
 
Old 12-24-2009, 06:50 PM   #12
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by druuna View Post
Perl definitely has its values, creating reports to name one of the most obvious.
why is that a "value" of Perl, considering other languages like Ruby,Python, PHP etc also capable of producing reports ?

Last edited by ghostdog74; 12-24-2009 at 06:51 PM.
 
Old 12-24-2009, 07:01 PM   #13
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
In my opinion (who else's opinion could I express...?), Perl, when used for the purpose it is intended, can result in very high productivity. Parsing and otherwise handling large volumes of text is certainly at the center of that purpose. If you grock regular expressions, it will feel very comfortable, as well. Almost any problem that looks like I could solve with sed or awk, I just reach for Perl, because I know I can solve it with that.
I prefer to use Perl as a CGI over PHP, but that's just me. For any kind of programming that will probably end up in a customer's hands, I would instinctively not use Perl, but again, that's probably just me.
I do some system management and similar activities in my work, and I doubt that a single day goes by when I don't write at least a little Perl; often one-liners on the commandline.

--- rod.
 
Old 12-24-2009, 07:10 PM   #14
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by theNbomr View Post
In my opinion (who else's opinion could I express...?), Perl, when used for the purpose it is intended, can result in very high productivity. Parsing and otherwise handling large volumes of text is certainly at the center of that purpose. If you grock regular expressions, it will feel very comfortable, as well. Almost any problem that looks like I could solve with sed or awk, I just reach for Perl, because I know I can solve it with that.
well, IMO as well, so can other languages... in the context of Perl "values", one of them i can think of is CPAN and its vast arrray of modules. Other than that, practically they all can do the same thing.
 
Old 12-24-2009, 10:36 PM   #15
MBybee
Member
 
Registered: Jan 2009
Location: wherever I can make a living
Distribution: OpenBSD / Debian / Ubuntu / Win7 / OpenVMS
Posts: 440

Rep: Reputation: 57
I'm seriously biased, but I've been using Perl extensively for 13 years now. I think it's the most flexible and useful language I've ever used.

I'll still opt for C if I need serious speed, or Javascript for web frontends, but everything is Perl these days.

As a side note - you can write REALLY unreadable Perl. I'd recommend against it - C-ish Perl is still perfectly readable 10 years later, while bizarre Perlisms tend to get confusing withing months.
 
  


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
Languages Worth Learning TaylanUB Programming 30 01-09-2010 10:45 AM
Python - worth learning? vharishankar Programming 39 07-08-2005 02:38 AM
Is Visual Basic worth learning? titanium_geek Programming 20 07-07-2005 09:58 AM
Is it really worth learning vi at this point? Tyir Linux - General 8 02-24-2004 12:51 AM
Is scripting worth learning ChimpFace9000 Linux - General 3 07-05-2001 04:02 AM

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

All times are GMT -5. The time now is 03:12 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