[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Need to print to STDOUT



Hi again

I'm learning to use Net::FTP right now, and I'm writing a script to show
me a log on a webserver.  I want the script to print the text document
retrieved from the server to STDOUT.  I'm using the 'get' command.  This
is what it says in FTP.pm:

>=item get ( REMOTE_FILE [, LOCAL_FILE ] )
>
>Get C<REMOTE_FILE> from the server and store locally. C<LOCAL_FILE> may be
>a filename or a filehandle. If not specified the the file will be
stored in
>the current directory with the same leafname as the remote file.


Now, this is a piece of the code I'm writing.

$ftp = Net::FTP->new("$server");
$ftp->login("$login", "$password");
$ftp->cwd("www/directory/");
$ftp->get("log.txt", <STDOUT>);

However, it seems to ignore the STDOUT and just creates the file
'log.txt' in the same folder as the script is running in.  Is this a
problem with MacPerl, or the module, or just me doing something wrong?

Sveinbjorn Thordarson

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org