Hello all, now that this works . . . 
I am trying to send the output from a database query over and FTP connection
into a remote file. When I run it like:

sqlrun mysqlfile.sql | myperlscript.pl

It seems to work alright. What I would like to do is have the perl scripts
kick off the query through a system( ) call and then feed the output into
the FTP connection. This is the one that works:

sql -d ltd01 -f q1.sql |
perl -e '
use lib qw( /qmds/mydir/perl/lib/site_perl/5.005/ );
use Net::FTP;
while( <> ) {
        $ftp=Net::FTP->new("10.206.15.30");
        $ftp->login("mydomain\\myname","mypass");
        $ftp->cwd("/myhome/mydirectory");
        $ftp->put(*STDIN,"myfile.txt")
                 or die("error!\n");
        $ftp->quit;
}
'

What could I use as the filehandle for the output from the system command?

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to