[ID 20000614.003] 5.6.0 File/Glob.pm incompatibility
authorAndy Dougherty <doughera@lafayette.edu>
Wed, 14 Jun 2000 13:33:32 +0000 (09:33 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Thu, 29 Jun 2000 21:56:14 +0000 (21:56 +0000)
Message-Id: <Pine.SOL.4.10.10006141332220.3643-100000@maxwell.phys.lafayette.edu>

p4raw-id: //depot/cfgperl@6274

ext/File/Glob/Glob.pm

index 98ee34d..57bfa0d 100644 (file)
@@ -138,6 +138,9 @@ sub csh_glob {
     $pat = $_ unless defined $pat;
 
     # extract patterns
+    $pat =~ s/^\s+//;  # Protect against empty elements in
+    $pat =~ s/\s+$//;  # things like < *.c> and <*.c >.
+                       # These alone shouldn't trigger ParseWords.
     if ($pat =~ /\s/) {
         # XXX this is needed for compatibility with the csh
        # implementation in Perl.  Need to support a flag