The above code gives the server response,in the Stdout. i want to redirect this out to a LogFile. since i do this FTP process in a Loop.From the logfile, i can check whether the file has been ftp'ed properly or not in the Log file. A similar code in Shell is like################################## $ftp = Net ::FTP->new("xxx.xxx.xxx",Timeout=>30,Debug=>1) $ftp->login($usr,$paswd) $ftp->cwd($dir) $ftp->get($filename); quit; #################################
here i get the log file from the FTP process into LOGFile. i would like to do the same in Perl. Could any one Help me in this Issue.######################################### ftp -nv ${ipaddress} << !!! > ${LOGFile} user ${USER} ${PASSWD} cd ${FTPHOME} get ${File} quit !!! #############################################
2002-10-26 Edit by Corion : Added Code tags
Try This: ganeshm69 ############################################# open( STDERR , "> FTP_LOG" ); $ftp = Net ::FTP->new("xxx.xxx.xxx",Timeout=>30,Debug=>1) $ftp->login($usr,$paswd) $ftp->cwd($dir) $ftp->get($filename); quit; close(STDERR); ############################################# #The response will be present in the log (FTP.log) file.In reply to Problem while FTP by ganeshm69
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |