in reply to Re^2: Finding names in files
in thread Finding names in files

consider File::Find::Rule to simplify things:
my @files = File::Find::Rule->file()->name->( '*.c', '*.h', '*.pr' )-> +in(qw( /tmp/dir1 /tmp/dir2 ));