slu

Søren's Blog

Random Ramblings

Previous Entry Share Next Entry
Perl for Java programmers
slu
A co-worker asked if/how/why he should learn Perl. He wanted a complimentary language to Java, which is what he mainly uses. Something for quick scripts, one-shot conversions, experimentation etc. Perl fits the bill perfectly.

There's really, in my opinion, only two other options: Python and Ruby. Both are great languages, but I know (and love) Perl, which has a C-like syntax, just like Java. Which is why we agreed that Perl was the way to go for him.

So, as a Java programmer, how do you get started with Perl?

You should start by reading the best (free) book about Perl: Modern Perl. It's also available for download as PDF or epub.

To try out Perl, you need to install it.

On Windows you have three possibilities:


  1. Strawberry Perl (see Installing Strawberry Perl on Windows 7)

  2. Perl under Cygwin (see Installing Cygwin Perl on Windows 7

  3. ActivePerl


If you're already using Cygwin, then use the Perl that comes with that. Otherwise, I would recommend Strawberry Perl, it's up-to-date, easy to install, free and open. I used ActivePerl years ago; it was the first easy to use Perl on Windows. It's still a very good product, it's has some Windows-specific modules and enhancements, and you can buy support from ActiveState.

I don't have a Mac, but as far as I know, Perl should be available by default. ActivePerl is also available for MacOS.

Linux will usually have Perl installed by default, or available in a package for simple installation. And ActivePerl is also available here.

I will (hopefully) blog a bit more about how to learn Perl as a Java programmer.

If you want to know more, check out O'Reilly's Perl section, especially Programming Perl, 4th Edition - avoid old books and tutorials, Perl has changed at lot through the years, and although it's still highly backwards compatible, best practice has changed quite a bit.
Tags: ,

?

Log in