What is Perl and how do I get started
June 18, 2009
Perl is short for “Practical Extraction and Report Language” and it merges the gap between scripting languages of SED and AWK and languages of C and C++. It has alot of the power of the formal languages but the ability to quickly get started like the scripting languages.
Where do I get Perl
So you have decided to give Perl a try and you need to get it. Here are a few resources to try.
www.activestate.com – This is where you Windows users can get Perl, you can also get it from www.perl.com
If you are using a Linux distro it usually comes packaged on the machine and it is already there. Otherwise you can use you package installer such as Yum ot Yast to install it. Lastly www.perl.com can get you a copy of the tar ball to install.
Now what
You have Perl installed at least you think so, so lets test it out. Go to a prompt or terminal sessions and type “perl –version” you should get some like this below:
This is perl, v5.10.0 built for MSWin32-x86-multi-thread
(with 5 registered patches, see perl -V for more detail)
Copyright 1987-2007, Larry Wall
Binary build 1004 [287188] provided by ActiveState http://www.ActiveState.com
Built Sep 3 2008 13:16:37
If you do not get anything back it just means Perl is not in you path and you will need to find the location of Perl on your machine and execute it from there.
Hello World
Where would we be if we didn’t start off with the hello world program. So, open you favorite text editor and type
print “Hello World!\n”;
Save the file as helloworld.pl next open a prompt or terminal session and find your new file and execute it by typing perl helloworld.pl
Now you have installed and successfully written your first Perl program.
Filed under: Perl, Programming | Comments (1)
Pretty good post. I just came by your blog and wanted to say
that I’ve really liked reading your blog posts. In any case
I’ll be subscribing to your feed and I hope you write again soon!