Perl Programming for Biologists Spring, 2006Eric Rouchka 3 University of Louisville
Now we need to edit the file
c:\autoexec.bat
file. This can either be done innotepad which can be found under Start-> Program->Accessories or by typing in thedos window:
edit c:\autoexec.bat
Now at the end of this file, add in the following line, substituting the correct locationof where Perl is installed. If you installed ActivePerl using the default locations, thenPerl is located in c:\Perl\Bin:
PATH=%PATH%;
PATH TO PERL GOES HERE
;PATH=%PATH%;c:\perl\bin;
And
save autoexec.bat
. You may now need to reboot your computer for thesechanges to take effect. Note that you only need to do this step once.
Creating Perl Programs
Perl programs can be created using any basic text editor, such as notepad. Perl programstypically end with a “.pl” extension. Make sure that if you are saving perl programs innotepad that you check it to save as all file types. Otherwise your perl programs willhave a .txt extension automatically added to them!
What is a Perl Program?
A program consists of a text file containing a series of Perl statements.
Perl statements are separated by a semi-colon.
Leading spaces on a line are ignored.
Multiple spaces, tabs, and blank lines are ignored.
Anything following # is ignored.
Perl is case sensitive.
Your First Perl Program
We will be starting with a simple program to get you started with learning what a Perlprogram looks like, and how it is created and run.
How do I edit or create a Perl Program?
For now, you can use either notepad, edit, or any other simple text editor to create yourperl program. The editor you choose to use must save your files as plain text. Perl filesshould always be saved with a .pl extension at the end.
Leave a Comment