Harry Putnam <rea...@newsguy.com> asked: > I pointed to that exact piece of code then asked how to make that > kind of options setting when using this format of find() > > find( > sub { > if(bla){ > blabla > } > }, > @dir > );
That's not possible, since there is neither an option parameter nor class variable by which you could change the behavior globally. > Your proposed code > > > find( { > > wanted => sub { > > print "$_\n"; > > print "$File::Find::name\n"; > > if ($lastfld eq $_) { > > print "<$lastfld> matches <$_>; Lets check the size:\n"; > > my $size = (stat($File::Find::name))[7]; > > print "$File::Find::name size: $size\n"; > > } > > }, > > no_chdir => 1, > > }, > > $dir2 > > ); > > doesn't do that. It does however "work" as intended ;-) HTH, Thomas