Perl Basics-Hello Perl

Step 1:Go to a Unix machine.

Step 2:Find in which directory perl is installed by typing the following command:

which perl.

Step 3:Create a new perl file[hello.pl] .Enter the below line of code.In my case perl is installed at /usr/bin/perl.Once you know the perl location,replace this line by the dir location where perl is installed.

#!/usr/bin/perl
print “HI there ! \n”;

 

Step 4:Now give rw permission to this file as below:

chmod -R 777 hello.pl

and execute ./hello.pl.

 

Yay ,you have executed your first perl program.

Welcome to Perl.Image

Advertisements

About qainterviews

Software Geek,QA Expert,Blogger
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s