how to write,compile and run Perl program in linux

Posted: March 2, 2017 in perl
Tags: , , ,

Learn  how to write compile and run Perl programming in Linux.This tutorial is for all those Perl Programmers who are interested in developing some linux tools or networking tools using perl Program.

Even if you are new to programming language perl is for you. You can easily start learning perl program on linux after reading this article.when you finish this article you will be able to write simple programs in perl on linux and you will be very easily able to compile your perl program on linux and run it smoothly without any error.

If you want to run your perl program run without error read this article till end very carefully because even a single small mistakes ruin your whole program.

Step 1: Install Perl Program Compiler.

[root@localhost ~]# yum install perl* -y

Step 2: Write and save your perl Program

[root@localhost ~]# cat > sarath.pl
#!/usr/bin/perl
print " learn perl programming at Ethical Hacking Tuition cenetr jaipur \n";
print " learn ccna ccnp linux cloud computing here \n";
print "All classes are lab based at Ethical hacking Tuition center jaipur \n"; 
[root@localhost ~]#

Step 3: Assign execute permission to your perl Program.

[root@localhost ~]# chmod 755 sarath.pl

Step 4: Run the perl Program named sarath.pl

[root@localhost ~]#perl sarath.pl
learn perl programming at Ethical Hacking Tuition cenetr jaipur 
 learn ccna ccnp linux cloud computing here
All classes are lab based at Ethical hacking Tuition center jaipur
Advertisements

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