foreach my $file ( grep { -f $_ } @files ) #### foreach my $file ( grep { -f "$path/$_" } @files )