[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Perl Programming within Debian

On Sat, Dec 30, 2006 at 08:06:51AM -0800, rocky wrote:
} Hey all,
} I wish all of you a Happy New Year!
} I'm thinking of learning Perl Programming. Can any of you help me get
} started on how to programming Perl in Debian? I mean what is the file
} extension for the perl? Is it .cgi? Do I need to use any compiler for
} perl? what is the best choice? How can I test my work(For instance in
} PHP programming I can use Firefox browse to the file I want to see the
} output)?

First, the information you are asking for:

- Perl code is interpreted by the perl executable
- the interpreter doesn't really care what the file extension is, but by
  convention most people use .pl
- it's an interpreter, not a compiler, and you pretty much only need the
  one (I think there's a way to compile down to the intermediate bytecode,
  but you certainly don't need that while you're just learning)
- test it by running your code; there is also at least one unit test
  framework, I believe

Now, my personal views:

Perl is the Visual Basic of the open source world. It's possible to write
good Perl code, but the structure and facilities of the language encourage
bad habits and unreadable code. If you want to learn an open source
scripting language, learn Ruby or Python. I prefer Ruby, but either one
will encourage better programming discipline than Perl. The information
about Perl I gave above pretty much applies to Ruby and Python as well. Any
of them are just an apt-get away.

} Thanks a lot in advance!
} Rocky

Reply to: