On Oct 24, 12:58 pm, [EMAIL PROTECTED] (John W. Krahn) wrote:
>
> I couldn't get $File::Find::prune to work on my system but this may be
> close to what you require:
>
> #!/usr/bin/perl
> use warnings;
> use strict;
> use File::Find;
>
> eval "use File::HomeDir;";
> $@ and die qq{[err] File::HomeDir not installed. Use "perl -e "use CPAN;
> install File::HomeDir;"" to install \n};
> my $home_directory = File::HomeDir->my_home;
>
> find( sub {
>      my $dev = ( lstat )[ 0 ];
>      $dev != $File::Find::topdev || $File::Find::name =~ m!/\.! && return;
>      /^AesTest/ && print "$File::Find::name\n";
>      }, $home_directory );
>
> __END__

John, thanks for the code. Your code does eliminate the printing of
hidden directories but not of file systems that are mounted
(like .gvfs). Now I need to figure out how to get features of both
working so that I can achieve my desired results (no hidden
directories and no mounted file systems being searched).


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to