Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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?

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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2021-02-25 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?