tags:

views:

584

answers:

17

As student of B.E(computer science). I thought Perl would be a good language to learn as it was not included in my degree program (which includes C, C++ and Java), but recently I checked out job offers on SO jobs and I was unable to find jobs that required Perl.

All I wanted to know was that am I making the right choice in learning Perl or should I start with something else?

+1  A: 

The language you use for your job depends to a certain extent on what kind of work you want to do. Perl is best at things like web applications and text processing. However, there are more up-to-date languages, like Ruby and Python, that are supplanting it to a certain extent. C# and Java are popular for developing "enterprise" applications. C/C++ tend to be used in applications where performance is important. There are also many alternatives to the "standard" languages that are used by various companies.

Instead of first picking a language, I would scan some job offers for jobs in areas that interest you. From those job offerings, you should be able to get an idea of what languages are popular for that kind of work. Then you can either broaden your skillset in one of the languages if you already know it or start learning a language if its a new language.

Eric
up-to-date does usually mean more hype. Look at such things as Moose, Catalyst, and many, many others
Alexandr Ciornii
I'm definitely a Perl supporter, but there's no denying it's lagging behind with things like reflection and having an interactive execution environment. The down votes must be from Perl people's feelings I hurt.
Eric
Eric: Moose, Class::MOP and Devel::REPL
Alexandr Ciornii
I appreciate that this functionality is being added on, but it's still not as nice as it is in other languages. In a similar vein, you could say that C supports classes because you could write the framework to support it yourself (e.g. early C++ compilers that compiled to C). It would, however, be erroneous to say that C natively supports classes much as it is erroneous to say Perl natively supports reflection.
Eric
A: 

I would suggest you to try Ruby or Haskell.

  • Ruby

    1. Ruby is easy to learn than Perl.

    2. Ruby is fast growing and you can enjoy the growing with Ruby.

    3. After learning Ruby you can easily understand other dynamic lanauage like Perl, Python, Unix bash, as Ruby has deep roots in these language.

  • Haskell

    It's just another programming paradigm that I think would be helpful for you (yes, also for me) to be a better programmer: functional programming. And, Haskell is also "hot".

pierr
I would suggest learning Haskell over Ruby. Haskell will force you to think in radically different ways. Ruby, Perl, Python, or Groovy will also help you to think differently, but not as much as Haskell.
Chas. Owens
Ruby was growing...
Alexandr Ciornii
A: 

I did Perl professionally for 3.5 years. I still use it from time to time for one-off jobs, but that's about the extent of my use these days.

Perl requires a tremendous amount of self-discipline if you want to do things correctly, and things I originally loved ( such as the variant typed variables ) soon became things I really didn't like. Toward the end of my time with Perl, I noticed that a good portion of my code was just checking and sanitising inputs with regexps.

The OO-model doesn't really feature access modifiers, but the convention for getting the instance variable within a method does present you with numerous opportunities to type :-

my $self = shit;

Which always made me chuckle.

Loved my time with it. Was good for the time. Will look forward to the days when there are high-value contracts out there to maintain it.

But, there are better choices out there now.

Are you specifically seeking to learn a "scripting" language?

Paul Alan Taylor
yes,im looking for something to learn during my holidays.anything gui scripting,server-side,client side scripting or application specific scripting.I'm basically looking for a skill that is both easy enough so that is doesn't ruin my holiday's at the same time useful in today's world
Ruschel
http://search.cpan.org/perloc?Perl::Critic solves most of the self discipline issues. Moose (OO) and Catalyst (web based GUI front ends) will encourage you to write well structured code.
singingfish
In that case, I'd seriously recommend picking up some Javascript with a library like jQuery or Mootools. Front-end scripting is very much in demand, and is a lot of fun to do. Libraries like jQuery or Mootools largely mitigate against the hair-pulling cross-browser issues.
Paul Alan Taylor
Try MooseX::Declare or signatures.pm.
Alexandr Ciornii
Will definitely take a look at Perl::Critic. Bit upset about the -2 :P
Paul Alan Taylor
Well I came very close to making it -3 ;-) I didn't because I can understand the position your coming from and I felt you gave a very honest opinion from your perspective. However I feel there is a good chance your perceptions may change if you take a look at some of the Modern Perl stuff like Moose/MooseX::Declare, Perl::Critic, autobox, etc.
draegtun
To add to above I recommend u check out Piers Cawley blog @ www.bofh.org.uk Piers is someone who switched from Perl to Ruby because of the things you mention in your answer. He as now switched back to Perl because of the Modern Perl stuff... http://www.bofh.org.uk/2009/02/22/moose-for-ruby-programmers
draegtun
I'll do as you suggest. It's been a long while since I played with Perl for a full-on production system. Evidently too long, considering my lack of current knowledge :)
Paul Alan Taylor
A: 

Perl is a great language, and it's possible to write substantial code in it, but I wouldn't describe it as a good language for beginners. It's very large, there are lots of ways to do everything, and it takes substantial practice to write well. I have a lot of Perl experience, and found it generally pretty unhelpful when looking at jobs. From an employment perspective, most jobs that require it are based around the LAMP stack, so are basically gluing databases to websites. This is pretty boring coding, IMHO.

I'd recommend Python as a nice auxiliary language to your C++ and Java, as it gives you handy prototyping skills and is much more succinct for many problems.

If you're more interested in improving your understanding of programming in general, then I'd strongly suggest learning a functional language like Lisp or Haskell for fun. You'll gain a lot of broad insight which is surprisingly useful to your work in your 'bread and butter' day job languages.

ire_and_curses
Many Perl jobs are also data mining or bioinformatics, or ... See jobs.perl.org.
Alexandr Ciornii
Python is what I learned on first, and I think it was a great way to start. It lets you get straight to the logic side of programming without a lot of complex syntax. Although, I'll admit that it did make the jump to OO coding more confusing than it otherwise would have been.
Sean O'Hollaren
+12  A: 

I am always puzzled by people who hem and haw over what language to learn. It is really not that hard to become conversant enough in any language to see if it is your cup of tea. You can then decide whether you like it enough to invest the further blood, sweat and tears to become proficient in it.

The easiest way to pick up enough basic Perl to see if you like it is to follow Picking up Perl. Even thought it is dated, it gives you a very good start to basic Perl 5.

You don't need to focus on one language at this stage. In fact, if you are interested in comparative evaluation, you should probably try Perl, Ruby and Python in parallel to see which one feels more natural to you and makes you more productive.

If you are interested in Perl jobs, you should start looking at jobs.perl.org.

Sinan Ünür
+9  A: 

If you are looking to learn a language for the sole purpose of finding a job then you have made two mistakes. The first is that the language is inconsequential to your ability to write code. Almost anyone can pick up new syntax with a book and a few days. Number two is that you should want to learn a language to learn and to see where and how it would be useful. I learned Perl as a tool. I was working as a sysadmin and I constantly had to manipulate text and log files. Perl was a natural choice and helped make my job easier. The point I am trying to make is that the language is a tool, that's it. Perl as a language is not going to help you find lots of job opportunities, but it will help you out once you are working! Being good with a hammer doesn't get a carpenter a job, understanding carpentry does. Being good with a hammer helps the carpenter make his job easier!

Molex
I agree with picking up the syntax in a few days, so long as you are dealing with an imperative language. Other styles (functional, declarative, stack, etc.) require a serious amount of ramp up time. Of course, this has more to do with the fact that people are generally only taught imperative style languages in school than the difficulty of programming in those styles. But picking up the syntax is the smallest part of learning a language. You must also learn the idioms of the language and its libraries.
Chas. Owens
It can take years to be truly proficient with a language and to know all it's idioms and libraries. If you are looking to find a job, you should focus on best practices and on constructing software. If you can write code, you will be able to do so in any language.
Molex
+1  A: 

I would recommend you read an article by our very own Joel Spolsky Called The Perils of Java Schools. You will see that this is not an article condemning java or any language, but it tells you about what are good programmers skills (which go waaaaay beyond languages).

My two cents here are: You should worry not about the languages you know, but you should try and grasp all the concepts involved in programming. I, particularly, find that knowing algorithm principles (complexity, control structures and so on) and complex data structures gets you a great milleage in programming.

Anyway, read the article by Joel, and if you care, listen to the first 2 or 3 SO podcasts which also talk about what COMP101 should be teaching...

Donato Azevedo
+8  A: 

Your question seems focused on the pragmatic "I'm going to be looking for a job at some point. What language experience will help me get that job."

While I don't disagree with some of the advice above regarding learning proper software engineering concepts, the truth is that 90% of the time your resume needs to make it through HR, and they are looking for certain key words, like Perl, SQL, XML, C++, etc.

In many cases, there are languages that are particularly popular in certain domains, so one approach is to think about what type of software engineering job you'll be looking for. Desktop apps might be C++, bio-informatics might be Perl, web coding now is likely javascript. With a general business direction, you can also focus your self-teaching on the appropriate area so you have things to talk about in the interview. For a Perl job, it might be, "I recently set up a web site using Catalyst with DBIx::Class as the ORM and MySQL as the database. I used Template::Toolkit for the templates..." etc. etc.

If you're really not sure, follow the advice above to do some small projects trying several different languages and see if something strikes you as interesting. You might find a language you like and a business area you want to pursue at the same time.

Jim Brandt
Agreed.The keywords in any job posting are very language/tech specific.
Paul Nathan
A: 

Do you want to be a programmer or a system administrator? Arguably, expertise in Perl is more useful to a system administrator.

quillbreaker
Tell that to the bioinformatics people, the web people, the database people, and the QA people; Perl is useful for all those topics and more. For the last nine years I have only accepted jobs/contracts that had a significant amount of Perl development and I have been steadily employed.
Chas. Owens
I never said it was useless. I've used perl and I like perl, but it does not make your resume glow like a shining star these days. As Sinan said, SO is at least one place that doesn't have perl jobs. My point specifically is that perl experience might be more valuable in the job section on Server Fault.
quillbreaker
Perl is not popular on many sites because Perl has standalone better sites. For example, Perl has it's own IRC server. And it's own job sites, so there is no need to publish on some site. On many popular sites, Perl has more jobs that languages like Ruby or Python.
Alexandr Ciornii
@quillbreaker http://jobs.perl.org/ has existed far longer than jobs.stackoverflow.com
Sinan Ünür
+3  A: 

Most people who think Perl is easy to pick up are the same people who malign it as being "unreadable spaghetti code." They think they can become proficient at it in a week.

Perl code can be quite beautiful, but you need some discipline. Same for any language. I have been slinging Perl since '91, and I am still fascinated by it. I wish I could write everything in it.

If Intel (and AMD) would just bury a Parrot in their future chips, life would be grand.

xcramps
I disagree with they idea of Parrot being put in the chip. That would mean it could no longer be improved. Java solved this problem with just-in-time compilation and Parrot should be able to as well. Virtual machines are better than real ones because they can be easily fixed/improved.
Chas. Owens
Yeah, just like the x86 assembler has never been improved. What's wrong with putting basic fundamentals that would support many interpreted languages in the core?
xcramps
+5  A: 

Lots of people are talking about how old Perl is and how its OO system is crufty and broken. I disagree with both of those points for the core language, but they do have some merit. However, these people probably have never seen Moose, or more specifically MooseX::Declare. Moose and MooseX::Declare are modules you can download from CPAN. CPAN is the number one reason to learn Perl. If you want to do something, chances are someone else wanted to do it before you and has written a module to do it.

Here is an example of MooseX::Declare:

use MooseX::Declare;

class Point {
    has x => (isa => 'Int', is => 'rw', required => 1);
    has y => (isa => 'Int', is => 'rw', required => 1);

    method clear {
     $self->x(0);
     $self->y(0);
    }
}

class Point3D extends Point {
    has z => (isa => 'Int', is => 'rw', required => 1);

    after clear {
     $self->z(0);
    }
}

class Line {
    use Carp;

    has start => (isa => "Point", is => "rw", required => 1);
    has end   => (isa => "Point", is => "rw", required => 1);

    method length ($axis1 = 'x', $axis2 = 'y') {
     croak "start point does not have $axis1 axis"
      unless $self->start->can($axis1);
     croak "end point does not have $axis1 axis"
      unless $self->start->can($axis1);
     croak "start point does not have $axis2 axis"
      unless $self->start->can($axis2);
     croak "end point does not have $axis2 axis"
      unless $self->start->can($axis2);

     my $x = abs $self->start->$axis1 - $self->end->$axis1;
     my $y = abs $self->start->$axis2 - $self->end->$axis2;
     return sqrt $x*$x + $y*$y;
    }
}

my $line = Line->new(
    start => Point->new(x => -2, y =>  8),
    end   => Point->new(x => -7, y => -5),
);

print $line->length, "\n";
Chas. Owens
+1  A: 

So they (try to) teach you C, C++, and Java. In order to broaden your horizon / become a better programmer, I suggest playing with a language that allows functional concepts and with a dynamically typed language. Perl works just fine for that (as probably does Ruby or Python). But you may also want to take a closer look at a Lisp dialect and Javascript.

hillu
+2  A: 

While you are in school, pick something that is completely outside the curriculum so you give yourself as broad an education as you can.

Learning Perl will add to your toolbox, and that can't be bad. There are no forms you have to sign, money you have to pay, or service contracts. You can start with it one week and give up with no consequences. At some point, you should learn one from that family of languages, however; either Perl, Python, or Ruby.

Languages like Perl & friends, Lisp, Erlang, and so on really deserve more than a couple of weeks of attention. When I want to learn those sorts of languages, I usually force myself to do absolutely everything with them for several weeks.

If you want to learn something different and you don't have a lot of time (as you noted in the comments), I recommend Smalltalk. The best teaching book on programming that I have ever seen is Squeak: Learning Programming with Robots, and it's free. It's actually written for nine-year olds but doesn't treat them as nine-year olds. Smalltalk has such an easy syntax that you don't get bogged down in reference manuals and the presentation is a Squeak environment that is ready to go. As you go through the lessons, you learn how to use the Squeak virtual machine, which is the toughest part of getting started. The best part, however, is that it is actually teaching you to program, and Smalltalk just happens to be what they use.

Smalltalk was where I first learned OO programming, even though I had been working with OO code for years. Even if you only spend a couple of weeks with it you'll get some benefit that you can apply to your other programming endevours. And, if you are worried about jobs, the people hiring for Smalltalk tend to pay a lot, mostly because only good programmers seem to know Smalltalk exists and big-money places seem to be the only ones to use it. :)

brian d foy
+1  A: 

Java, for better or worse, is used by a lot of companies, so knowing that is going to help. If you have a good grasp of more beefy languages like C and C++, I think learning a scripting language like python or perl is a great idea.

(Plus they're pretty damn fun)

Sean O'Hollaren
A: 

Since you are already know C, C++ and Java Perl isn't going to take a lot of time to learn. However it may require sometime to master as it isn't so much of a straight forward language to read and write. However it is the most powerful (It's my opinion, no flames on this) language. It doesn't hurt you to know it. The reason why there aren't a lot of jobs advertising Perl is that it is only employed in companies with critical missions. Smaller jobs seek PHP or something like that. The main reason is that it is hard to find good perl programmers. Don't be disheartened, If you are a good programmer you'll get job.

Christy John
+3  A: 

I agree with those who ask: what kind of programming do you want to do?

If Perl is one of the best languages for that type of programming, learn it. (CGI, ETL, database publishing, text processing, system administration, etc.)

If not, there is a second reason to learn Perl: having a complete toolset. All programmers should learn at least one language or tool in these bread and butter areas:

1) database access (SQL is a must, Perl has excellent DBI/DBD access to multiple databases) 2) text processing (Perl is a winner here) 3) GUI (Java/Swing, C#, VB, JavaScript/HTML/CSS, ActionScript 3, take your pick) 4) ETL (Perl is great here, XML is necessary, XSLT annoying but useful, also tools like Informatica, but Java has great open source libraries for reading MS Office documents) 5) Scripting (either learn Perl which is nearly cross-platform, or choose one dictated by your OS, like DOS CMD, Unix bash/csh/tcsh etc, MAC's scripting technologies) 6) OO programming (Java, C++, C#, and even Perl) 7) Internet communication (Java, C#, etc.)

I am not paid to be an XYZ programmer - I am paid to accomplish a task. Perl adds value to many of my projects, even when they are not Perl projects. At my current job, I write AS3 in Flash. But our customers supply data in many forms, and Perl's ETL capabilities are necessary for turning the data into a form useable in our system.

One of the other posters broached the subject of whether you should learn a language just to get a certain job. That depends. Some popular languages are used by millions of programmers. When a company wants to hire a new staff member, they expect to find an experienced programmer who also is proficient in the language. To get such a job, you must already be experienced in the language as well as the industry. However, in newer languages (and out-of-date languages), there may be few programmers available who know the language and have a solid comp-sci background. Such was the case at my current place of employment. Rather than hire an ActionScript programmer, they chose to look for an experienced programmer who could learn ActionScript in a hurry. Prior to the interview they expected each candidate to study the language for a few days and write a program to solve a problem that they posed. I had never used ActionScript, but overcame that hurdle, learned the essentials in a weekend, wrote the program and got the job last Fall.

Paul Chernoch
A: 

You might find Paul Graham's essay, "The Python Paradox" relevant: http://www.paulgraham.com/pypar.html