Perl: Hello World!!

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.


Lets write a first program in perl that prints "Hello World". The small program goes as follows:

#! usr/bin/perl print "Hello World!";

Write this program using your favourite editor vim, emacs, jedit, ultraedit or whatever. Eclipse (IDE commonly used for Java platform) has a very nice plug-in for Perl and can be highly productive and fast for Perl projects. After the above program is written, simply save the file (say, as hello.pl) and type:

shell> perl hello.pl

The output comes out to be:

shell> Hello World!

Congratulations on running your first Perl program!!





Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.