Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: ftpbackup

by mandog (Curate)
on Nov 09, 2001 at 20:58 UTC ( [id://124409]=note: print w/replies, xml ) Need Help??


in reply to ftpbackup

A few small things

It looks you are testing for comments twice.

for (my $nr = 0; $nr < $filearrnr; $nr++) { splice (@filearr, $nr, 1) if ($filearr[$nr] =~ /^#/) }
and
next if ($filearr[$nr] =~ /^#/);
You might consider the more perlish, more compact construction
foreach my $nrl (@hostarr){}
instead of:
for (my $nr1 = 0; $nr1 < $hostarrnr; $nr1++)

If you wanted to be moderately fancy you could  fork() each server's FTP session. That way your script wouldn't hang waiting for an unreachable host to time out



email: mandog

Replies are listed 'Best First'.
Re: Re: ftpbackup
by enaco (Novice) on Nov 09, 2001 at 23:45 UTC
    Thanks for the pointers mate.

    Il hack something up tonight, this is getting more fun the more you learn :o)

Log In?
Username:
Password:

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

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

    No recent polls found