Installing Perl
From Neural Wiki
From Wikipedia:
"Perl is a dynamic programming language created by Larry Wall and first released in 1987. Perl borrows features from a variety of other languages including C, shell scripting (sh), AWK, sed and Lisp."
Personally, I find Perl to be a useful language for making other programs work together. However, I am starting to steer towards Python which is easier to use and has many packages available
[edit] Instructions for installing active Perl
I have not purchased any of their products, but I am impressed with their program, so if you can purchase it, please do.
They offer a free download which should work for most of us who just need an intermediate program.
- 1. Download from ActiveState website for free, or buy the DVD, both are at the first link below.
http://www.activestate.com/store/productdetail.aspx?prdGuid=81fbce82-6bd5-49bc-a915-08d58c2648ca alternatively http://www.neuralwiki.org/downloads/ActivePerl-5.8.8.820-MSWin32-x86-274739.msi
- 2. Installation is easy, just double click on the icon once it downloads.
- 3. Active Perl will automatically set up the parameters to make it accessible from the command prompt. You should do all of your programming from the command prompt, it makes you a much better programmer.
[edit] Run a Perl script in Windows
1. click Start,
2. Run
3. Type cmd into the box that pops up.
4. get the command prompt into the folder with your script. For example, if it is in a folder called test which is located on the desktop, type cd desktop/test into the command prompt.
5. To run the script, (say the script is called test.pl) type perl test.pl into the command prompt.
[edit] Using Perl to run other programs
Perl can tell your system to run scripts that are in another programming language. Simpler programs like Fortran do not readily have this capability.
Example:
Below is a simple Perl script which runs two Fortran files (test1.f & test2.f) back to back using G77 Fortran. This is handy if you need the output of one file to run the other, and do not want to sit around and wait for the first one to finish. You can also run say a Matlab file, then a Fortran file one after the other. The possibilities are endless.
#!/usr/bin/perl
{
system "g77 test1.f -O3";
system "a";
print("Creating anova analysis \n");
system "g77 test2.f -O3";
system "a";
}

