in reply to File::Find in a loop

I have no idea why so many people actually go to the trouble of creating an actual sub in their code called "wanted". Pass a coderef...

use strict; use warnings; use File::Find; my @dir = qw( N:/TMP N:/TMP_2 ); for my $dir (@dir) { find(sub { print "[$dir] $File::Find::dir $File::Find::name\n"; }, $dir); }
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name