in reply to Re: visit directories and more...
in thread visit directories and more...

@little,WhiteBird and others Thank you. I read the tutorial about FILE::Find and wrote a new script. But there is a new problem. I hope you can help me:
#!/usr/bin/perl -w use File::Find; find(\&print_name_if_dir, "/home/dub/Stelle"); sub print_name_if_dir { my $file = $_; if (-d $file) { $dir=$file; open(FILE, "> $dir") or die "Konnte $dir nicht mit Schreibrecht +en öffnen: $!\n"; close(FILE); }; if (-f $file) { open(FILE, ">> $dir") or die "Konnte $dir nicht öffnen: $!\n"; print FILE "$file\n"; close(FILE); }; };
1.if-command: open(FILE,"> $dir") - I want create a new file (text-file) which has the name of the visited directory.
But $dir contains the directory. How can i solve this problem ?