I just recently installed ActivePerl 5.12.2.1202 on my Windows XP in C:/Perl
. I am new to Perl scripting.
I just want to run a Perl program which contains one print
statement, which I saved in Notepad with the name ex.pl
.
Running Perl scripts from the command line¶ Where yourscriptname.pl is the name of the script you want to run. If you are using Windows and have associated the extension of the file with Perl, typing yourscriptname.pl (that is, without calling perl first) will also launch the script.
Run Perl program from command prompt
start->run>cmd
(command prompt will appear), write perl full_path_of_your_script
,
likeC:\> perl hello.pl
#This assumes that perl is in your PATH environment variable.
There are many Perl Editors, you can used for Perl scripts like DzSoft, Perl Expess, Komodo Edit etc and also see http://www.perlmonks.org/?node_id=169668 and Perlfaq3- Windows Perl Editors for more detail.
Have a look at http://docs.activestate.com/activeperl/5.12/, for ActivePerl 5.12 documentation.
Perl programs (or any other program run by an interpreter) is run by passing the script as a command-line argument to the interpreter. For example, in this case:
perl.exe ex.pl
Padre the Perl IDE and Kephra are good editors for Perl.
As an alternative to ActivePerl, there is Strawberry Perl.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With