(Folder);
}
}, c:\\ph\\
);
}
-Ursprüngliche Nachricht-
Von: Nagy Tamas (TVI-GmbH)
Gesendet: Freitag, 10. Juli 2015 09:16
An: $Bill; beginners@perl.org
Betreff: AW: Traversing directory recursively
Hi,
I also tried the $writer = shift, but it drops an error
[mailto:dbec...@gmail.com]
Gesendet: Freitag, 10. Juli 2015 07:55
An: Nagy Tamas (TVI-GmbH)
Betreff: Re: Traversing directory recursively
use strict;
use warnings;
use IO::File;
use XML::Writer;
my $output = IO::File-new(default.xml); my $writer =
XML::Writer-new(OUTPUT = $output, DATA_MODE = 1
On 07/10/2015 04:50 AM, Nagy Tamas (TVI-GmbH) wrote:
Hi,
That works fine, thx:
sub Traverse
{
find({wanted = sub {
if(-d $File::Find::name) {
$writer-startTag(Folder, Name =
$File::Find::name);
}
}, postprocess =
Hi,
So I have a better version. But if it goes down in the recursion tree, at the
end it goes into infinite loop,
because there is no other dir inside the last dir in the tree. At this point it
has to step back. But instead
of stepping back it goes into infinite loop. Why?
sub Traverse
{
On Jul 9, 2015, at 8:27 AM, Nagy Tamas (TVI-GmbH) tamas.n...@tvi-gmbh.de
wrote:
Hi,
So I have a better version. But if it goes down in the recursion tree, at the
end it goes into infinite loop,
because there is no other dir inside the last dir in the tree. At this point
it has to
On 07/09/2015 01:19 PM, Jim Gibson wrote:
It is because you are calling the Traverse() subroutine with two arguments to
recurse a directory tree, but you are not using the arguments. Each call to
Traverse uses the global $dir variable as the root of the tree, so it will
never terminate.
You