Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Dir recursion

by ozone (Friar)
on May 07, 2004 at 08:17 UTC ( #351389=note: print w/replies, xml ) Need Help??

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?


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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://351389]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2022-05-25 04:50 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (84 votes). Check out past polls.