http://qs321.pair.com?node_id=430250

Toby80 has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,
I'm trying to download a Lotus Notes database from a server. Thererfore I found the excellent program here. With this program I'm able to download all the files from this database.

My problem now is, that the database is build like this: database -> folder -> subfolder1 -> subfolder2 -> files
and if I just download it then it is stored like this: \Notes2Files\folder\all_the_files but if possible I would like to have it in the same style as the database is build itself, including the subfolders.
And I'd also like to download only particular folders

# Loop over all of the folders foreach my $viewname (GetViews($database)) { # Continue only for one folder if ($viewname eq "folder") { # Get the object for this View print "Saving Messages in folder $viewname..."; my $view = $database->GetView($viewname);
... what can be easily done with the "if - question".

Now my idea was to insert another "foreach" loop after this "if - question" to check for the next sublevel of my database. Unfortunately a simple  foreach my $subview (GetViews ($viewname)) creates an error like:  Can't use string ("$viewname") as a HASH ref while "strict refs" in use at test.pl line XX.
I looked at the value that $database contains at the first loop, but Win32::OLE=HASH(0x1978a3c) doesn't really help me. So, I don't understand in the moment how I can deal with this problem or what I have to do to make to program rum.

Maybe someone can help me out with a good idea or simpely the syntax of the "foreach" loop ;-)

Thank you very much in advance

Tobi

I'm using Perl v.5.8.4 under WinXP with Lotus Notes 5.0.11