PERLS FROM WISDOMBAY

A technology Blog from the creator's of http://www.wisdombay.com . This Technoblog is meant to be a One Stop Shop for PERL Programmers. Here I am planning to keep a frequently updated journal filled with code, tutorial's and tips for PERL Lovers.

Tuesday, April 04, 2006

How to set up the Perl Farm (or rather technically setting up your PC for Perl Programming)

So, today I will guide you through the process of setting up a machine, for starting your action packed trek in pursuit of Perl Wisdom.

The first thing to do to get your lean mean machine to tackle Perl is to install the required files under the bonnet of your machine. To do this we have to acquire the desired version of Perl to suit your machine’s platform. The one place, which can supply you with all the needed Perl paraphernalia, is CPAN (Comprehensive Perl Archive Network)
. Here you can get hold of almost anything related to Perl and here you can download the needed binaries for installing Perl on your PC.

CPAN lists Perl binaries suitable for a majority of Operating Systems and it include versions for such exotic Os's like Windows CE and Symbian OS. If you don’t have the installation files for Perl with you, then this is the time to acquire them from the above given link.


I will cover installation issues related to Linux and Windows Boxes in this Post.

What to do if you have a Linux Box ?

Allmost all major Linux distro’s (Debian, Mandrake, Redhat, SuSe …) ships Perl along with the OS, so if you have it on your system then you are up and ready for the journey. For those who doesn’t have perl on their machine’s download the latest stable Perl package for Linux and follow the below steps.

I suppose that the build of Perl that we are going to install is ‘Perl-5.8.0’.

Step 1 : Prepare Perl for compilation

./configure.gnu --prefix=/usr

Step 2 : Compile the package

make

Step 3 : Install it

make install

That’s it !!!.


Now use the remaining time that you have, before going further, by downloading some IDE (Integrated Development Environment) for Perl.Some nice one’s available for Linux are PerlBuilder
and PerlEdit

What to do if you have a Windows Box ?

You can either download the latest binary for Windows as a standalone thing or you can download whole packages like ActivePerl , CamelPack etc. Double click the binary file to start the installation. These are fairly straight forward in their installations as each has it’s own wizard based installation programs. Even though you can do perl programming with a plain vanilla text editor like Notepad, you can also arm your machine with some IDE’s for windows like Komodo , Arachno Perl etc. These IDE’s have many features which can make Perl programming a whole lot more simple.

Now you have successfully equipped your machine with a Perl Teeth, and let’s try it out with the ubiquitous ‘Hello World’ Program.

SideTrack


 A side stepped trail from the main road
In programming parlances, a ‘Hello World’ program is considered as the first step taken towards the long process of mastering a programming language. This kind of thing started when Dennis Ritchie and Brian Kernighan released the book called ‘The C Programming Language’ (also called the ‘White Book’ or ‘Old Testament’). They gave a simple program which just printed the words “Hello World” to the standard output, and since then almost all computer language textbooks follows this standard for introducing a programming language.

Wanna read more on the Hello World thingie !! Check these out
http://en.wikipedia.org/wiki/Hello_World
http://www2.latech.edu/~acm/HelloWorld.shtml - The Hello World Project.

Here is our first taste of a Perl program,

print "Hello, world!\n";

This program does nothing more than printing "Hello, world!" followed by a newline character on to the standard output. So, let’s windup this session here. We can go further in to the intricacies of executing a Perl program in the next session.

0 Comments:

Post a Comment

<< Home