Perl Hello World Program

Perl Hello World Program

In this tutorial, we will learn how to write a Hello World program in Perl language. We will go through each statement of the program.

Perl Program


print "Hello, World!\n";


Hello, World!

Working of the "Hello, World!" Program

  1. #!/usr/bin/perl
    This line is known as the shebang line and it indicates that the script should be run using the Perl interpreter located at /usr/bin/perl.
  2. print "Hello, World!\n";
    This line prints the string "Hello, World!" to the standard output. The \n is an escape sequence that adds a new line after the text.