I'd rather use File::Find:$ mkdir foo bar $ touch bar/1 $ touch bar/2 $ touch bar/3 $ touch foo/4 $ touch foo/5 $ touch foo/6 $ mkdir -p bar/tze $ touch bar/tze/7 $ touch bar/tze/8 $ touch bar/tze/9 $ perl -w 651889.pl | sort | uniq -c 1 ./651889.pl 1 ./bar 1 ./bar/1 1 ./bar/2 1 ./bar/3 1 ./bar/tze 1 ./bar/tze/7 1 ./bar/tze/8 1 ./bar/tze/9 1 ./foo 1 ./foo/4 1 ./foo/5 1 ./foo/6
$ perl -wle 'use strict; use File::Find; find(sub { print if -f }, "." +);' 651889.pl 1 3 2 8 7 9 6 5 4
In reply to Re: Traversing directories recursively
by andreas1234567
in thread Traversing directories recursively
by jesuashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |