Step 1:Go to a Unix machine.
Step 2:Find in which directory perl is installed by typing the following command:
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.
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.