NAME
Net::FTP::Shell - Perl extension for shell use of Net::FTP::Common
SYNOPSIS
# from the DOS/Unix shell...
shell> please.pl get gnu emacs.tgz # ... will ftp a file to gnu acct
shell> please.pl send gnu vi-sucks.truth # ... will ftp a file to gnu acct
shell> please.pl dir gnu # ... will list directory of gnu acct
shell> please.pl mkdir gnu /new/wares # ... must use absolute path
shell> please.pl check gnu 'emacs-30.tar.gz'
shell> please.pl glob gnu '.*.tar.gz' # ... not a glob, but a regexp
shell> please.pl describe gnu
----- account named "gnu" --------
username: wareboy
password: gnupass
host: ftp.gnu.org
directory: /users/wareboy
xfer_type: I (binary transfers... ascii is A)
Debug : 1
Timeout : 240
DESCRIPTION
This is a module which was designed when point-to-point FTP communication between two people is not possible (ie, for firewall reasons) but they need to exchange files and they have a common FTP account somewhere.
PREREQUISITES
Net::FTP::Common (CPAN id: TBONE)
User (CPAN id: TBONE)
Config::IniFiles
note that IniFiles 1.6 has a small problem with the regular expression on line 399:
elsif (($parm, $val) = /\s*([\S\s]+?)\s*=\s*(.*)/) { # new parameter
should be
elsif (($parm, $val) = /\s*([\S\s]+?)\s*=\s*(\S*)/) { # new parameter
I have sent in a bug report. Until then, patch your Config::IniFiles to the above before sending any problem reports with this module.
INSTALLATION (Important)
Installing the module is easy:
perl Makefile.PL
make install
Then, you can either type
perl install.pl
and have a default .ncfg placed in your home directory or you can do the manual process described below:
Manual Process
You must create a file named ".ncfg" and place in your home directory. On Unix, you can find your home directory by typing
echo $HOME
On Windows, open a command shell and type
set USERPROFILE
The .ncfg file is written in Windows INI-file syntax. Here is a sample one:
[Default]
User = heave
Pass = ho
Host = 229.117.122.180
Dir = /download
[Instinet]
Dir = /download/instinet
[Rydex]
Dir = /download/rydex
[Socgen]
Dir = /download/socgen
[Linda]
Dir = /download/linda
[Terrence]
Dir = /download/terrence
Then you can simply use the please.pl Perl script to send things:
perl please.pl send Linda love-letter.txt
perl please.pl send Terrence resume.doc
AUTHOR
T. M. Brannon, tbone@cpan.org
SEE ALSO
www.metaperl.com, www.rebol.com, Net::FTP::Common, Net::FTP