my $global_prune = 0; sub wanted { $File::Find::prune = 1 and return if $global_prune; $global_prune = 1 if /first match/; }