5 # -----------------------------------------------------------------------------
11 # Search for *.[CH] files with "it's"
12 # This contraction (== "it is") looks too much like "its" (possesive)
13 # and confuses non-native (and some native) English speakers.
15 # - print filename and lineNumber
17 # -----------------------------------------------------------------------------
19 my $re_filespec = qr{^.+\.[CH]$};
21 # for the convenience of &wanted calls, including -eval statements:
22 ## use vars qw( *name *dir *prune );
23 ## *name = *File::Find::name;
24 ## *dir = *File::Find::dir;
25 ## *prune = *File::Find::prune;
28 unless ( lstat($_) and -f _
and -r _
and not -l _
and /$re_filespec/ ) {
35 print "$File::Find::name line=$.\n";
42 ## Traverse desired filesystems
44 no warnings
'File::Find';
45 warn "(**) checking '$dir' ...\n";
46 File
::Find
::find
( { wanted
=> \
&wanted
}, $dir );