# advertise that we want to store a file. # $filename should probably not contain a path my $conn = $ftp->stor( $filename ); # open the local file if( open my $fh, $filename ) { my $buf; while(my $read_bytes = read($fh, $buf, 1024) > 0) { $conn->write($buf, $read_bytes); # add your progressbar update here } }