Thursday 11 April 2013

Pearl Getting start guide Reference link

Install pearl in window step by step guide:
--------------------------------------------

http://perl.about.com/od/gettingstartedwithperl/ss/installperlwin.htm

Run pearl first programm in windows:
---------------------------------------

http://www.editrocket.com/articles/perl_windows.html

run command for pearl script:
------------------------------

C:\Pearlscripts>C:\Pearl\bin\perl hello.pl
Hello World!
C:\Pearlscripts>
---========================================
http://www.activestate.com/activeperl/

Click on the appropriate download link. You can leave the registration form blank and just hit continue to proceed. Download the windows msi installer. Run the installer. The areas of interest in the installer are the install location. If you are only running Perl on Windows machines, you can use the default location. If you also have Perl programs running on Linux or Mac OS X, you may want to change the install location to C:\usr. This will allow you to maintain portability in your programs. You can also check the box so that Perl gets added to the path, and check the box to create the perl file extension association. After the installer completes, you now have Perl on your machine.
Perl programs can be created using any text editor such as EditRocket. Perl programs and scripts typically end with the .pl extension. EditRocket will automatically recognize files with the .pl extension as Perl programs, and will color the syntax accordingly.
To create a Perl program, simply create a new file, such as hello.pl. In the file, place the following:
#!/perl/bin/perl
print "Hello World!";
Notice the first line of the file. Perl scripts should start with the path to Perl on the first line. The path to Perl should be the location where you installed Perl on your Windows machine.
The above script can be executed using the EditRocket Tools -> Perl -> Execute Program option, or you can execute it from a command prompt. To execute the script in the command prompt, use the cd command to cd to the directory where the hello.pl file was saved, such as

cd C:\scripts

If when installing Perl, you selected the option for Perl to be added to the path, type the following:

perl hello.pl

Hello World! should then be printed to the screen.

If Perl is not in your Path, you will need to type the full location of the perl executable to run the program, such as C:\Perl\bin\perl hello.pl

No comments:

Post a Comment