Hello
I've found the following problem with the "minimalist" quantified subpattern.
With this line :
$ echo "_foo_bar-" |perl -ne '@test= (/_(\w*?)-/) ; print $test[0],"\n" ;'
I get :
foo_bar
But I'd think I should get only 'bar' since I asked for a minimun match.
(although it's a "backward" minimum match).
Note that this works when I ask for a "forward" minimun match :
$ echo "-foo_bar_" |perl -ne '@test= (/-(\w*?)_/) ; print $test[0],"\n" ;'
foo
Here's the output of myconfig :
Summary of my perl5 (patchlevel 1) configuration:
Platform:
osname=hpux, osver=9, archname=hpux
uname='hp-ux marlis a.09.05 a 9000715 2010519172 two-user license '
hint=recommended
Compiler:
cc='cc', optimize='+O2', ld='ld'
cppflags='-D_POSIX_SOURCE -D_HPUX_SOURCE -Aa'
ccflags ='-D_POSIX_SOURCE -D_HPUX_SOURCE -Aa'
ldflags =''
stdchar='unsigned char', d_stdstdio=define, usevfork=true
voidflags=15, castflags=0, d_casti32=define, d_castneg=define
intsize=4, alignbytes=8, usemymalloc=n, randbits=15
Libraries:
so=sl
libpth=/lib/pa1.1 /lib /usr/lib /usr/local/lib
libs=-lm -ldld
libc=/lib/libc.sl
Dynamic Linking:
dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef
cccdlflags='+z', ccdlflags='-Wl,-E ', lddlflags='-b'
Thanks for the wonderful work you've done on perl5.
--
-----------------------------------------------------------------------------
Name: Dominique Dumont
^^^^^^ Email: Dominique_Dumont@grenoble.hp.com
/ O O \ HP Desk: Dominique DUMONT / HP6300/UM
( \____/ ) Address : HEWLETT PACKARD, 38053 Grenoble Cedex 09 FRANCE
\______/ Tel,Telnet: (33) 76 62 57 24 - 7 779 5724
Telex,Fax: 980 124 - (33) 76 62 14 88
-----------------------------------------------------------------------------
"What is the sound of Perl? Is it not the sound of a wall that
people have stopped banging their heads against?"
--Larry Wall
I've found the following problem with the "minimalist" quantified subpattern.
With this line :
$ echo "_foo_bar-" |perl -ne '@test= (/_(\w*?)-/) ; print $test[0],"\n" ;'
I get :
foo_bar
But I'd think I should get only 'bar' since I asked for a minimun match.
(although it's a "backward" minimum match).
Note that this works when I ask for a "forward" minimun match :
$ echo "-foo_bar_" |perl -ne '@test= (/-(\w*?)_/) ; print $test[0],"\n" ;'
foo
Here's the output of myconfig :
Summary of my perl5 (patchlevel 1) configuration:
Platform:
osname=hpux, osver=9, archname=hpux
uname='hp-ux marlis a.09.05 a 9000715 2010519172 two-user license '
hint=recommended
Compiler:
cc='cc', optimize='+O2', ld='ld'
cppflags='-D_POSIX_SOURCE -D_HPUX_SOURCE -Aa'
ccflags ='-D_POSIX_SOURCE -D_HPUX_SOURCE -Aa'
ldflags =''
stdchar='unsigned char', d_stdstdio=define, usevfork=true
voidflags=15, castflags=0, d_casti32=define, d_castneg=define
intsize=4, alignbytes=8, usemymalloc=n, randbits=15
Libraries:
so=sl
libpth=/lib/pa1.1 /lib /usr/lib /usr/local/lib
libs=-lm -ldld
libc=/lib/libc.sl
Dynamic Linking:
dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef
cccdlflags='+z', ccdlflags='-Wl,-E ', lddlflags='-b'
Thanks for the wonderful work you've done on perl5.
--
-----------------------------------------------------------------------------
Name: Dominique Dumont
^^^^^^ Email: Dominique_Dumont@grenoble.hp.com
/ O O \ HP Desk: Dominique DUMONT / HP6300/UM
( \____/ ) Address : HEWLETT PACKARD, 38053 Grenoble Cedex 09 FRANCE
\______/ Tel,Telnet: (33) 76 62 57 24 - 7 779 5724
Telex,Fax: 980 124 - (33) 76 62 14 88
-----------------------------------------------------------------------------
"What is the sound of Perl? Is it not the sound of a wall that
people have stopped banging their heads against?"
--Larry Wall