Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: ftpsync

by maj12 (Novice)
on Oct 24, 2001 at 01:16 UTC ( [id://120916]=note: print w/replies, xml ) Need Help??


in reply to ftpsync

I got this code to work when the remote dirs and files
dont exist but as soon as I try to overwrite files that
are already there, it fails with:

cant put /var/www/accucaps/data/test.cgi, data/test.cgi: Bad file desc +riptor at ./mirror.pl line 121.<br>

Here's my edited sub:

sub checknew ($) { my $localfile = join ( "", $home, @_ ); foreach my $myfiles(@_) { $myfiles=~s/^\///; } if ( -e $localfile && -f $localfile ) { # local file is new, rmt file doesn't exist..transfer $ftp->put( $localfile, @_ ) or die "cant put $localfile, @_: $ +!"; print "ADDED_FILE: @_\n"; $new++; $unchanged--; return 0; }

What gives?

Log In?
Username:
Password:

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

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

    No recent polls found