Полезная информация

Learning Perl

Learning PerlSearch this book
Previous: What This Book Is AboutPrefaceNext: Additional Resources
 

Retrieving Exercises

The exercises in this book are available electronically in a number of ways: by FTP, FTPMAIL, BITFTP, and UUCP. The cheapest, fastest, and easiest ways are listed first. If you read from the top down, the first one that works is probably the best. Use FTP if you are directly on the Internet. Use FTPMAIL if you are not on the Internet but can send and receive electronic mail to Internet sites. Use BITFTP if you send electronic mail via BITNET. Use UUCP if none of the above works.

Note: The exercises were prepared using a UNIX system. If you are running UNIX, you can use them without modification. If you are running on another platform, you may need to modify these exercises slightly. For example, whereas under UNIX every line ends with a line-feed character (the carriage return is implicit), under DOS every line must end with explicit line-feed and carriage-return characters. Depending upon your own configuration and transfer method, you may need to append carriage returns. See the README file accompanying the exercises for additional information.

FTP

To use FTP, you need a machine with direct access to the Internet. A sample session is shown below.

% ftp ftp.oreilly.com
Connected to ftp.uu.net. 
220 ftp.oreilly.com FTP server (Version 6.34 Thu Oct 22 14:32:01 EDT 1992) ready.
Name (ftp.oreilly.com:username): anonymous 
331 Guest login ok, send e-mail address as password.
Password: username@hostname            Use your username and host here 
230 Guest login ok, access restrictions apply. 
ftp> cd /published/oreilly/nutshell/learning_perl2
250 CWD command successful. 
ftp> get README 
200 PORT command successful. 
150 Opening ASCII mode data connection for README (xxxx bytes). 
226 Transfer complete. 
local: README remote: README 
xxxx bytes received in xxx seconds (xxx Kbytes/s) 
ftp> binary
200 Type set to I.
ftp> get examples.tar.gz 
200 PORT command successful. 
150 Opening BINARY mode data connection for examples.tar.gz (xxxx bytes). 
226 Transfer complete. local: exercises remote: exercises 
xxxx bytes received in xxx seconds (xxx Kbytes/s) 
ftp> quit 
221 Goodbye. 
%

FTPMAIL

FTPMAIL is a mail server available to anyone who can send electronic mail to and receive it from Internet sites. This includes any company or service provider that allows email connections to the Internet. Here's how you do it.

You send mail to . In the message body, give the FTP commands you want to run. The server will run anonymous FTP for you and mail the files back to you. To get a complete help file, send a message with no subject and the single word "help" in the body. The following is an example of a UNIX mail session that gets the examples. This command sends you a listing of the files in the selected directory and the requested example files. The listing is useful if there's a later version of the examples you're interested in.

% mail ftpmail@online.oreilly.com
Subject: 
reply-to username@hostname      Where you want files mailed 
open 
cd /published/oreilly/nutshell/learning_perl2 
dir 
get README 
mode binary
uuencode
get examples.tar.gz
quit
.

A signature at the end of the message is acceptable as long as it appears after "quit."

BITFTP

BITFTP is a mail server for BITNET users. You send it electronic mail messages requesting files, and it sends you back the files by electronic mail. BITFTP currently serves only users who send it mail from nodes that are directly on BITNET, EARN, or NetNorth. BITFTP is a public service of Princeton University. Here's how it works.

To use BITFTP, send mail containing your FTP commands to . For a complete help file, send HELP as the message body.

The following is the message body you should send to BITFTP:

FTP  ftp.oreilly.com  NETDATA 
USER  anonymous 
PASS your Internet e-mail address (not your BITNET address) 
CD  /published/oreilly/nutshell/perl/learning_perl2 
DIR 
GET README 
GET examples.tar.gz
QUIT

Questions about BITFTP can be directed to on BITNET.

UUCP

If you or your company has an account with UUNET, you will have a system with a direct UUCP connection to UUNET. Find that system, and type (as one line):

uucp uunet\!~/published/oreilly/nutshell/learning_perl2/examples.tar.gz yourhost\!~/yourname/

The backslashes can be omitted if you use the Bourne shell (sh) instead of csh. The example file should appear some time later (up to a day or more) in the directory /usr/spool /uucppublic / yourname.


Previous: What This Book Is AboutLearning PerlNext: Additional Resources
What This Book Is AboutBook IndexAdditional Resources