Red Hat Bugzilla – Bug 825713
find2perl does not translate ? glob properly
Last modified: 2013-11-20 23:40:37 EST
+++ This bug was initially created as a clone of Bug #825701 +++ $ find2perl -name 'a?b' [...] # Traverse desired filesystems File::Find::find({wanted => \&wanted}, '.'); exit; sub wanted { /^a.?b\z/s && print("$name\n"); } The regular expression is wrong. Correct one is /^a.b\z/s. Reported to upstream as <https://rt.perl.org/rt3/Public/Bug/Display.html?id=113054>. Patch is available there: --- find2perl.orig 2012-03-06 19:36:39.000000000 +0000 +++ find2perl 2012-05-23 12:21:04.976166972 +0100 @@ -648,7 +648,8 @@ sub fileglob_to_re ($) { my $x = shift; $x =~ s#([./^\$()+])#\\$1#g; - $x =~ s#([?*])#.$1#g; + $x =~ s#\*#.*#g; + $x =~ s#\?#.#g; "^$x\\z"; } RHEL-6.2 (perl-5.10.1-127.el6.x86_64) is affected.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1534.html