The first thing I did was to run the podchecker program on yours and it produced two syntax errors.
Some comments:
159 sub wanted 160 { 161 my $file = $File::Find::name; 162 163 # 164 # We only care about files. 165 # 166 return if ( -d $file );
I guess you are assuming that there are no named pipes or FIFOs or other types of files?
167 168 # 169 # Skip some mailboxes. 170 # 171 foreach my $exclude ( split( /,/, $CONFIG{'exclude'} ) )
What if you have a file name with a comma in it?
172 { 173 if ( $file =~ /$exclude/i )
What if you have a file name with a regex meta-character in it? What if the contents of $exclude are a subset of a larger file name? $file includes the complete path so $exclude could match on one of the path names. What if you want to exclude 'file' but not 'FILE'?
174 { 175 $CONFIG{'verbose'} && print "Excluded mail file: $ +file\n"; 176 return; 177 } 178 } 179 180 181 # 182 # Skip files if they've not been modified too recently. 183 # 184 my $time = -M $file; 185 if ( defined( $time ) ) 186 { 187 if ( $time > $CONFIG{'time'} ) 188 { 189 $CONFIG{'verbose'} && print "Mail file not modifie +d recently: $file\n"; 190 return; 191 } 192 } 193 else 194 { 195 $CONFIG{'verbose'} && print "Failed to stat: $file - $ +!\n";
You report an error if you cannot stat the file but not at line 166?
196 return; 197 }
HTH
Edit: g0n - moved comments out of code tags
In reply to Re: Show mbox files with unread mail messages in them
by jwkrahn
in thread Show mbox files with unread mail messages in them
by skx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |