亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標題: perl腳本執(zhí)行ftp,AIX7和suse10操作系統(tǒng)傳輸碼制問題? [打印本頁]

作者: oceanmeng    時間: 2014-04-24 14:31
標題: perl腳本執(zhí)行ftp,AIX7和suse10操作系統(tǒng)傳輸碼制問題?
以下perl腳本執(zhí)行ftp到服務端(AIX7)獲取文件,bin寫在login前面了,語法是否正確? 若不正確,是不是到AIX上默認用bin下載?
  1. my $ftp = Net::FTP -> new ( $ftpServerIP );
  2. if ( defined($ftp) && $ftp )
  3. {
  4.         $ftp -> binary();
  5.         $ftp -> login( $ftpServerUserName, $ftpServerPassword );
  6.         $ftp -> cwd( $ftpServerFilePath );
  7.         $ftp -> pasv(); # passive mode
  8.         @ftpServerFileList = $ftp -> ls($ftpServerFilePattern);

  9.         foreach my $ftpServerFileName (@ftpServerFileList)
  10.         {
  11.                 if( $ftpServerFileName =~ /$todayYMD/ )
  12.                 {
  13.                         print "Debug: Get File Name From CCF Server: $ftpServerFileName .\n";
  14.                         $ftp->get("$ftpServerFileName");
  15.                 }
  16.         }
  17.         $ftp -> quit;
  18. }
復制代碼
同樣perl腳本ftp到服務端(suse10)獲取文件是不是默認用asc下載?
作者: yybmsrs    時間: 2014-04-24 15:01
http://search.cpan.org/~shay/libnet-1.25/Net/FTP.pm

The protocol also defines several standard translations which the file can undergo during transfer. These are ASCII, EBCDIC, binary, and byte. ASCII is the default type, and indicates that the sender of files will translate the ends of lines to a standard representation which the receiver will then translate back into their local representation. EBCDIC indicates the file being transferred is in EBCDIC format. Binary (also known as image) format sends the data as a contiguous bit stream. Byte format transfers the data as bytes, the values of which remain the same regardless of differences in byte size between the two machines (in theory - in practice you should only use this if you really know what you're doing).




歡迎光臨 Chinaunix (http://72891.cn/) Powered by Discuz! X3.2