in reply to bag of questions...
If you don't want to use a module you can always do it yourself:use Symbol; # Time passes my $foo = gensym(); open ($foo, "<$file") or die "Cannot read $file: $!";
my $foo = do {local *FOO};
Now for more useful comments. Do as it says in perlstyle and on every open of a file, directory, etc check for errors and die with an informative message. The basic rule is avoid making errors if you can, arrange that any errors you make will be caught ASAP, and arrange that they are caught with enough information to fix the error. With your code should the code be run by a user who does not have sufficient permissions to create the directory you won't get told what the real problem is and it may take a while to even notice the problem.
And finally for this task I strongly suggest getting and installing rsync. (Search at Google if you do not have it already.) Efficiently recursively backing up directories from one spot to another, one machine to another if need be, using a variety of protocols is a solved problem. :-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re (tilly) 1: bag of questions...
by kapper (Chaplain) on Aug 27, 2000 at 18:31 UTC | |
by tilly (Archbishop) on Aug 27, 2000 at 18:39 UTC | |
by Mushy (Scribe) on Aug 27, 2000 at 23:07 UTC | |
by kapper (Chaplain) on Aug 27, 2000 at 19:16 UTC |