I want to implement a status/progress bar in my little piece of find file code. I've looked at Term::ProgressBar and Smart::Comments and I've tried many many different examples. But I cannot figure out how to implement either of the two into my code. Any pointers/tips/ideas would be appreciated.
Here is my code: #!/usr/bin/env perl ## This finds all directories named AesTest in a user's home directory. # It ignores hidden directories and other mounted file sytems, like .gvfs. # use File::Find(); eval("use File::HomeDir;"); die "[err] File::HomeDir not installed. Use \"perl -e \"use CPAN; install \ File::HomeDir;\"\" to install \n" if $@; use strict; use warnings; use 5.010; my $home_directory = File::HomeDir->my_home; my $search_for = "AesTest"; find_directories(); exit; sub find_directories { print "\nLocating directory...\n"; File::Find::find(\&want_directory, $home_directory); } sub want_directory { my $dev = ( lstat )[ 0 ]; ($File::Find::prune |= ($dev != $File::Find::topdev) || ($File::Find::name) =~ m!/\.! && return); /^$search_for/ && say "$File::Find::name"; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/