my $namematch = $options{r} // 's/\.[^.]+$/+/r'; my @name; eval '@name = $file =~ '.$namematch;