in reply to Dir recursion

I agree with the previous comment, but would like to comment on the problem anyway ...

if (-f "$dir/$file") { print "SEND $dir/$file to ftp server\n"; &Put_File($dir, $file); } else {
This test doesn't make sense in the context of what you are doing. If I'm seeing it correctly, this check should always pass, because you got the filename from the readdir just above. I think you possibly meant to check that the file exists on the remote side?

HTH

UPDATE: now I see what's being done. D'oh!

Replies are listed 'Best First'.
Re: Re: Dir recursion
by AcidHawk (Vicar) on May 07, 2004 at 08:39 UTC
    Thanks you for your comments, however, I am checking if $file is a file (it could be a directory), if it is a file I do an FTP put (&Put_File I check if the file exists on the remote in that sub) however if it is a dir I check the remote to see if that dir exists on the remote and then I run the Process_Struct again.
    -----
    Of all the things I've lost in my life, its my mind I miss the most.