|
||||
|
|
System Requirements and Getting Perl
Hardware and Operating System RequirementsPerl is available for nearly every computing platform on the planet, from aging 486 desktops to supercomputing clusters. First, you need to decide where you're going to be running your programs. If you're mostly interested in writing web applications, you'll probably want to choose a web hosting company that has Perl pre-installed on their web servers (most do). If you're going this route, this tutorial will assume you have SSH or telnet shell ("command prompt" for the folks using a Windows host) access to the server your programs will live on. We're going to run our first few programs from the shell to ease the learning process. Windows users can use PuTTY, a telnet/SSH client, to log into their user accounts on web servers. Please note that using telnet is strongly discouraged, as your username and password will be sent over the Internet in plain text. SSH is a secure protocol designed for running shell sessions on remote hosts, and is highly recommended. Getting Perl and Additional SoftwareIf you don't have a web hosting environment available, don't despair. If your desktop computer runs MacOSX or any common Linux distribution, you already have Perl installed. Most of the topics covered in this tutorial deal with general programming instruction, and don't require a web server at all. Windows users can download and install ActiveState Perl on their desktops, and can optionally install the Apache web server and MySQL database server for a complete development setup. At minimum, a locally installed web server and MySQL database are required to follow along with the tutorial chapters dealing with web applications and databases.
Programming EditorsPerl doesn't require any special editor or IDE (integrated development environment) software. You can write your programs in any text editor, such as Notepad for Windows or gedit for Linux. If you're logged into a remote host via SSH, you could use programs like nano or vi to write your scripts. Applications like Microsoft Word or Wordpad should be avoided, as you need to save your programs as plain text files. If you're a Windows user and savings your programs locally for upload to a web server, you'll want to use an editor that supports syntax highlighting (different colors for different commands) to make your programs easier to read. Several editors are available:
If you're planning to upload your programs to a remote web server, you should always try to use SFTP (as opposed to FTP) to transfer the files. Like telnet, FTP is an insecure protocol that sends your login information over the Internet in plain text. SFTP encrypts the channel between your desktop and the server, protecting your login from interception by nefarious third parties. Windows users can use the free program WinSCP to securely upload their files. You can also use software like SftpDrive (non-free, $39.00 USD, six-week free trial) to mount your web server's filesystem locally, allowing you to avoid the hassle of uploading files after each change. Users of Ubuntu Linux and other distributions already have SSH filesystem support built into their GUI; simply type "ssh://yourserver.com/path/to/files" in your Nautilus address bar and enter your login information. In the next section, we'll begin our first official Perl lesson with an explanation of variables and data types. Continue: Variables and Data Types Table of Contents
|
|||
| All contents Copyright © 2007-2011 ClassHelper.org®. Please see our Privacy Policy. | ||||