|
|
|
|
Tools |
I have ported these instructions written
by Ksoze (@ http://www.deny.de/kz/perl.html)
to searchlores.org in October 2000
Running Perl Scripts by Ksoze
In order to run a perl script, you must have a working perl
interpreter for your OS.
- UNIX : Most Unix/Linux machines have a standard perl interpreter
located in /usr/bin/perl or /usr/local/bin/perl
(Refer to your Os web page if you cant find perl)
- Windows(9x or NT) : You have to download and install ActivePerl
by www.activestate.com
(I suggest you stay away from calling/contacting M$ for
any known problem)
After you got a working interpreter, you can run perl scripts (default
extension .pl) by :
- UNIX : $ ./script_name.pl [parameters]
You must be sure the first line of the script points to the perl
interpreter preceeded by a #!
(ex. #!/usr/bin/perl)
- Windows : From a DOS PROMPT -> c:\path\to\perl.exe script_name.pl
[parameters]
Task : We want to run perl scripts in a faster way (linux like),
that is we want to associate .pl extension to
perl interpreter so we can start scripts this way :
From a DOS PROMPT -> script_name.pl [parameters]
Solution :
From DOS PROMPT -> ftype perl=c:\path\to\perl.exe -w "%1" %*
Then -> assoc .pl=perl
(assoc /? and ftype /? to get help on those commands)
(the -w param tells interpreter it has to report any found problem)
I am pretty sure perl stuff is also available for BeOs OS/2
Machintosh etc..
Perl installation must be done ONCE, after you can benefit
the powerful of this great language forever.
(c) 2000: [fravia+], all rights
reserved