Perl
From DrugPedia: A Wikipedia for Drug discovery
Line 15: | Line 15: | ||
Regardless of the program you choose to use, a PERL file must be saved with a .pl (.PL) file extension in order to be recognized as a functioning PERL script. File names can contain numbers, symbols, and letters but must not contain a space. Use an underscore (_) in places of spaces. | Regardless of the program you choose to use, a PERL file must be saved with a .pl (.PL) file extension in order to be recognized as a functioning PERL script. File names can contain numbers, symbols, and letters but must not contain a space. Use an underscore (_) in places of spaces. | ||
+ | |||
+ | '''PERL - First Script''' | ||
+ | With PERL installed we are ready to dive into our first script. There are a few elements every PERL script must contain in order to function. Open up your favorite simple text editor, the file extension for PERL scripts is .pl. Save your files with this extension. | ||
+ | The first line of every PERL script is a commented line directed toward the PERL interpreter. This line is generally the same from one instal of PERL to the next, it might look something like this: | ||
+ | '''firstscript.pl:''' | ||
+ | #!/usr/bin/perl |
Revision as of 09:23, 3 September 2008
Created in 1986 by Larry Wall, the UNIX based language has evolved into a powerful tool for the internet. It was designed as a quick-fix patch program for UNIX based systems. The language is very simplistic, offering optimum flexibility, perfect for short, straightforward scripting.
Since then its popularity has increased due to its flexibility, portability, usefulness, and its varied features. To get started, load a simple text editor program and follow along in our examples.
PERL - Getting Started First things first, you must have latest version of PERL installed on your web hosting machine available for download via Perl.com, just follow the download links. They also offer installation help for a wide variety of operating systems. We suggest you direct any installation help to the experts there.
This page will be web based, working with and creating files over the internet. File management is the bread and butter of the PERL language, and as you will discover, it's absolutely perfect for doing so.
PERL - File Extension A PERL script can be created inside of any normal simple-text editor program. There are several programs available for every type of platform. There are many programs designed for programmers available for download on the web.
Regardless of the program you choose to use, a PERL file must be saved with a .pl (.PL) file extension in order to be recognized as a functioning PERL script. File names can contain numbers, symbols, and letters but must not contain a space. Use an underscore (_) in places of spaces.
PERL - First Script With PERL installed we are ready to dive into our first script. There are a few elements every PERL script must contain in order to function. Open up your favorite simple text editor, the file extension for PERL scripts is .pl. Save your files with this extension. The first line of every PERL script is a commented line directed toward the PERL interpreter. This line is generally the same from one instal of PERL to the next, it might look something like this: firstscript.pl:
- !/usr/bin/perl