From: Peter Hickman Date: 2003-03-01T01:42:36+09:00 Subject: Re: ftp slow You might try locating the part that is slowest. #!/usr/bin/ruby require 'net/ftp' ftp = Net::FTP.new('E0152') puts Time.now st = ftp.login("opecon", "123",0) puts Time.now files = ftp.chdir('/home/opecon') puts Time.now ftp.gettextfile('DAILYC', 'DAILYC') puts Time.now ftp.gettextfile('DAILY', 'DAILY') puts Time.now ftp.close and take timings at the same point in the perl code and see where the problem lies. Does ruby take longer to logon? Does ruby take longer to CD? Does ruby take longer to transfer a file? I also note that perl is just getting the files and ruby is getting a text file, maybe there is an overhead in ruby hangling a transfer as a text file (line ending conversion etc) that perl is not having to deal with. Can't you just use ftp.getbinaryfile() and see if that speeds things up. It will at least tell you where the problem might be.