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

Re: Dir recursion

by ozone (Friar)
on May 07, 2004 at 08:17 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://351389]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-19 14:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found