Thursday, November 20, 2008

what is the perl

well , Perl is a scripting language with this language you can automate various tasks in your Linux system. Learning Perl is both easy and fun, and you'll soon be able to write scripts which will make your life easier. In these series of articles we'll start by explaining the basics and we'll progressively introduce more complex concepts and advanced techniques. We'll try to explain things as much as possible, so whether you are familiar to programming or not, you should find it easy to learn Perl and be comfortable with using this language after the end of this series of articles.


Do you know History of the Perl !


Larry Wall created a scripting language in 1987, which he called the "Practical Extraction and Report Language". It was designed as a text-processing language for Unix operating systems. Various tools and languages already existed (Unix shells, sed, awk, C...etc) and programmers usually used many of them together. Larry Wall wanted the language to cover all aspects and needs related to text-processing so the programmer wouldn't have to use any other tool in conjunction with Perl. Also, he designed Perl as a language that was easy and fast to use but which would also allow the programmer to get into the innards of things.

Perl offered features no other language had offered before. It was filling a niche no other tool had, and it immediately became popular. In 1994, Perl 5 was released and at that stage it was a stable and well established general purpose programming language.


Its Time for Installation of Perl right ?


If You are windows User Please follow these steps to install perl


1 Open your browser and go to the http://www.perl.org/get.html




2. click on the Active perl for AIX and Linux and Window

then you may get like this


3. Then Click on the Download optin you may get like this




4. save that in Desktop or your deafult download location then that may take one or two min like this


5. then you may get that software like this then click on that


6. then follow the next steps and see




7. next



8. next



9. next and finish




10. then go for the " C:\Perl\bin" that path and copy it




11.then go for the " My computer "and right click on that and go for the "Properties" in that tab

go for the "Advanced tab" then there you may find out "Environment variables" click on that tab




12. then you may another wizard in there will be two column there try to edit that and paste the path


13. then close that


How do run the programs


Create a new directory in in your drive with name of the perl and in that open one noet pad write sample program

#!/user/bin/perl

print "Hellow Siva\n";

and save it as a programname .pl in perl directory so now open that cmd and go that directory

i mean that if that directory is there in desktop so we need to go there i mean that directory and compile as perl programname.pl

if once it Complete then you will get the result like

Hellow Siva


Lets go for the Linux or Unix systems


How do we check the Perl

open the terminal and type "Perl -v"

that will show current Version of the Perl software

if it not showing any Version so may need to install manually for that you may use" yum install perl" this command or with rpm

so finally here also we may run that script same as like as windows


Do you know what are variables ?Align Right



If you are a programmer , Variables are not new for us but If you are a beginner its not a problem variables are nothing but what we used in algebra in maths

for example x+5 =9;