in reply to How can I use printf FORMAT strings for (Win32) shell globs?

printf format codes are also used by scanf, and String::Scanf provides format_to_re()

So, maybe something like:

# Untested # Use a printf/scanf pattern to match file names use String::Scanf qw(); use File::Find::Rule; my @w = qw( . ); # where to look my $f = $ARGV[0]; $f =~ s/[\012\015]+$//; # universal chomp() my $r = String::Scanf::format_to_re($f); my @files = File::Find::Rule->file() ->name( $r ) ->in( @w );