in reply to NET::FTP truncates files

Your CGI program may have received the whole file, but did you remember to close it before doing the ftp? If not, you may have a buffering problem. The put is sending everything that exists on the disk, but there may be more in memory that hasn't been written out yet. When your program terminates, the file will be closed, and that last buffer will be written. So when you go to examine the file on the server, it'll be complete.

Replies are listed 'Best First'.
Re: Re: NET::FTP truncates files
by Largos (Initiate) on Aug 09, 2001 at 10:58 UTC
    that was it!

    I can't believe I didn't close it. Thanks for the help and ideas, to everyone. All I needed was close(FILE); before the ftp code :)

    Rogan Creswick