Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: ftpbackup

by mandog (Curate)
on Nov 09, 2001 at 20:58 UTC ( #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
Node Status?
node history
Node Type: note [id://124409]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2020-10-25 19:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (249 votes). Check out past polls.

    Notices?