Perl is a very useful scripting language. It is a universal tool for everyone with some programming skills.
A simple program
- #!/usr/bin/perl
- print "Hello World!\n";
Let's look at the program in more details.
The first line of the program is a special comment. Comments in Perl program start from the pound sign (#) to the rest of line. There is no sign for block comment. On UNIX systems, two characters #! starting in a line indicates the program is stored in the file /usr/bin/perl
The second line starts with print statement followed by a string “Hello World” and then followed by a semi-comma. Every Perl statement has to be ended with a semi-comma (;).
You can also launch Perl program by double click on the source code file. There is no *.exe or *.dll file when you write Perl programs. If you want to distribute Perl program just copy the source code to other.
No comments:
Post a Comment