Steps to Run Perl
April 30, 2009Running PERL
before you may need to read about practitioner programming perl, ok next,.
The easiest ways to run the program is to call the perl interpreter and perl program name as argument
perl example.pl
Name of program or file is example.pl perl and perl is the name of the perl interpreter. Of course the above perl program assumes that the perl path is known, if not then we need to call the full path as follows:
/ usr / local / bin / per example.pl
Well if you are using Windows 98 or Windows NT, you can call in a way that is almost the same, namely:
C: \ Ntperl \ perl example.pl
Of course the way in making up a bit. For that we can simplify the called without including the name of the perl interpreter, so just the name of the file perl-its only
example.pl
There are several things that must be done on a Unix system, namely:
1. Adding the full path location of the perl interpreter on file dibaris first perl program as follows:
#! / usr / local / bin / perl
# Name of Program: hello.pl
print “Hello World \ n”;
2. So that the perl program file can be executed directly, it is necessary to change the file mode as the mode of execution of the file system UNIX, that is
Chmod + x example.pl
On Windows systems, to make a perl program can be executed directly, it can be done by making the association between the file extension .Pl and perl programs. So every file ending pl will executed by perl programs, precisely active perl
MAKE PERL SCRIPT “HELLO WORLD”
Perl script is a text file that consists of a set of commands perl. Here are some general provisions to note:
1. Empty spaces at the beginning of the line will be ignored
2. Perl command terminated with semicolon or a semicolon “;”
3. Fence or a sign “#” will be defined as where the comment behind will be ignored
4. On Unix systems, the first line of the program included the location of perl, for example #! / Usr / local / bin / perl
Well, you see the program first, hello world!
#! / usr / local / bin / perl
# Name of Program: hello.pl
print “Hello World \ n”;
let’s do the following steps:
$ Perl hello.pl
Hello world
Or
$ Chmod + x hello.pl
$ Hello.pl
Hello world
$
TYPE DATA
There are several main types of data types, namely:
Scalar
* Array
* Assosiatif array (array continued)
- Practitioners programming perl You may never make a program with a shell script....
- Simple Steps to anticipate Virus There are a few simple steps to protect your computer...
- Steps How to Share Files Between Two Computers Some friends ask to me about how to share files...
- Introduction Batch Programming batch programming language is used by the Command Prompt (CMD),...
- Scalar Data You may want to Read Practitioner Programming Perl and Step...
- Dos Commands In XP Dos Commands is easy to use to make little tool...
- How to Write a batch File Batch (with CMD code), can do something on windows computer...
- Steps How to Format Hard Drive on Windows Vista One of the tips to keep in mind to reformat...
- Make detection Files with batch using batch programming, we can detect a file on the...
- Batch File Copy Folder Tricks This is the simple trick of batch file code to...
[...] Next (step to run perl) [...]
[...] may want to Read Practitioner Programming Perl and Step to Run Perl First . Scalar data can be defined as a data that can be manipulated by perl, can [...]