foreach (@subdirs){ # declared but not used my $directory_current = $_; # later my @files = $rule->in( @subdirs ); }