in reply to catching errors from file::find

my $directory = 'e:\logs'; my $temp = -d $directory ? find ({wanted => \&wanted,bydepth =>0}, $di +rectory) : undef;
Or, maybe:
if (-d $directory) { # find... } else { # do some error processing stuff }