examples/tree
raw| 1 | #!/usr/bin/perl |
| 2 | |
| 3 | # $Id$ |
| 4 | |
| 5 | use strict; |
| 6 | use warnings; |
| 7 | use File::Find::Object; |
| 8 | use Getopt::Long; |
| 9 | |
| 10 | my %options; |
| 11 | |
| 12 | GetOptions( |
| 13 | 'd' => \$options{depth}, |
| 14 | 'n' => \$options{nonet}, |
| 15 | 'f' => \$options{nocrossfs}, |
| 16 | 'l' => \$options{followlink}, |
| 17 | ); |
| 18 | |
| 19 | my $tree = File::Find::Object->new({ %options }, @ARGV); |
| 20 | |
| 21 | while (my $r = $tree->next()) { |
| 22 | print $r ."\n"; |
| 23 | } |