Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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] =~ /^#/) }
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?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2021-10-18 19:15 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (75 votes). Check out past polls.