Most Recent Blog

King's View of the Battle

 Open GL model of a chess board.

March 13, 2011

Perl - Hello World

Writing hello world in perl is almost to simple to justify a post, however there are some caveats and for completeness of this group of posts, it will be included.
Step 1 Install Perl (5.x)
Once installed, make sure that you can access the perl executable.  If perl is not in the path, you will need to add it.

Step 2 Create a Perl Source file
______________________Source File____________________________
#!/opt/perl
print ("Hello World in Perl from ecocrypt.blogspot.com")
______________________End Source____________________________
save the source to a file called helloworld.pl  (or any other name of your choice)

Step 3 Tell Perl to execute the input file
prompt % perl helloworld.pl
Hello World in Perl from ecocrypt.blogspot.com

Congratulate yourself! You have successfully installed perl, create a perl source file, and executed it.

No comments:

Post a Comment

All comments are greatly appreciated! Comments will be moderated, and usually appear within 1 day. If you like a post, instead of saying you like it, vote for it or digg it (links provided). If there is any ERROR, PLEASE Comment I strive for good quality complete content.