Bug#601251: perl: /x modifier doesn't seem to make regex completely whitespace-insensitive

Britton Leo Kerin britton.kerin at gmail.com
Sun Oct 24 16:49:05 UTC 2010


Package: perl
Version: 5.10.0-19lenny2
Severity: normal


Given: 

     $tdl = 'dir       call netrw#Explore(<count>,0,0+<bang>0,<q-args>)
     ' 

This doesn't die:

     $tdl =~ s/^( augroup | buffer | command | dir | environment | event |
                  expression | file | shellcmd | function | help |
                  highlight | mapping | menu | option | tag |
                  tag_listfiles | var | custom | customlist ) \s+
                (.*)
              /
               $2/x or die "foo";

But this does:

     $tdl =~ s/^( augroup | buffer | command | dir | environment | event |
                  expression | file | shellcmd | function | help |
                  highlight | mapping | menu | option | tag |
                  tag_listfiles | var | custom | customlist ) 
                        \s+
                (.*)
              /
               $2/x or die "foo";

The only different is the \s+ is on a line by itself in the second case.


-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages perl depends on:
ii  libc6                    2.7-18lenny2    GNU C Library: Shared libraries
ii  libdb4.6                 4.6.21-11       Berkeley v4.6 Database Libraries [
ii  libgdbm3                 1.8.3-3         GNU dbm database routines (runtime
ii  perl-base                5.10.0-19lenny2 minimal Perl system
ii  perl-modules             5.10.0-19lenny2 Core Perl modules

Versions of packages perl recommends:
ii  netbase                       4.34       Basic TCP/IP networking system

Versions of packages perl suggests:
ii  libterm-readline-gnu-per 1.17a-2+b1      Perl extension for the GNU Readlin
ii  libterm-readline-perl-pe 1.0302-1        Perl implementation of Readline li
ii  perl-doc                 5.10.0-19lenny2 Perl documentation

-- no debconf information






More information about the Perl-maintainers mailing list