yes... but I don't think you are checking the exit status if that's all you
are doing, don't know much about the bit status it returns but it's the same
for system and open for a command.

> -----Original Message-----
> From: Balint, Jess [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 15, 2002 3:12 PM
> To: 'Nikola Janceski'
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: Sending Command Output over Net::FTP
> 
> 
> Can I still receive the exit code from that command that way? 
> That is how I
> am testing if the query ran correctly. Hence:
> 
> $code = system( "sqlrun mysqlfile.sql" );
> print "Error" if $code;
> 
> -----Original Message-----
> From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 15, 2002 3:17 PM
> To: 'Balint, Jess'; '[EMAIL PROTECTED]'
> Subject: RE: Sending Command Output over Net::FTP
> 
> 
> you probably want to use open();
> 
> open(COMMAND, " |") or die "cannot execute: $!";
> while(<COMMAND>){
> #ftp stuff
> }
> 
> 
> > -----Original Message-----
> > From: Balint, Jess [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, April 15, 2002 3:05 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: Sending Command Output over Net::FTP
> > 
> > 
> > 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]
> > 
> 
> --------------------------------------------------------------
> --------------
> --------------------
> The views and opinions expressed in this email message are 
> the sender's
> own, and do not necessarily represent the views and opinions of Summit
> Systems Inc.
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


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

Reply via email to