R
ruwolf
(Sorry, I have sent this message to comp.lang.perl.moderated but no
response has been returned to me.)
I think I have found an error in perlop documentation.
Because here:
http://perl.jonallen.info/projects/perldoc
is recommended to report bugs here:
http://lists.cpan.org/showlist.cgi?name=perl5-porters
and there (in FAQ) is recommended asking on the comp.lang.perl.misc or
comp.lang.perl.moderated,
I am asking here.
In perlop documentation,
- Regexp Quote-Like Operators
-- \G assertion
is this:
====START=OF=QUOTATION====
$_ = <<'EOL';
$url = URI::URL->new( "http://example.com/" ); die if $url eq
"xXx";
EOL
LOOP:
{
print(" digits"), redo LOOP if /\G\d+\b[,.;]?\s*/gc;
print(" lowercase"), redo LOOP if /\G[a-z]+\b[,.;]?\s*/gc;
print(" UPPERCASE"), redo LOOP if /\G[A-Z]+\b[,.;]?\s*/gc;
print(" Capitalized"), redo LOOP if /\G[A-Z][a-z]+\b[,.;]?\s*/gc;
print(" MiXeD"), redo LOOP if /\G[A-Za-z]+\b[,.;]?\s*/gc;
print(" alphanumeric"), redo LOOP if /\G[A-Za-z0-9]+\b[,.;]?\s*/
gc;
print(" line-noise"), redo LOOP if /\G[^A-Za-z0-9]+/gc;
print ". That's all!\n";
}
Here is the output (split into several lines):
line-noise lowercase line-noise lowercase UPPERCASE line-noise
UPPERCASE line-noise lowercase line-noise lowercase line-noise
lowercase lowercase line-noise lowercase lowercase line-noise
MiXeD line-noise. That's all!
=====END=OF=QUOTATION=====
I think it is wrong result
and my copy of this example gives me different result:
=====START=OF=MY=RESULT=====
line-noise lowercase line-noise UPPERCASE line-noise
UPPERCASE line-noise lowercase line-noise lowercase line-noise
lowercase lowercase line-noise lowercase lowercase line-noise
lowercase lowercase line-noise MiXeD line-noise. That's all!
======END=OF=MY=RESULT======
(I have older doc with "http://www/" and it seems to me wrong, too.)
Is it really a bug in doc?
response has been returned to me.)
I think I have found an error in perlop documentation.
Because here:
http://perl.jonallen.info/projects/perldoc
is recommended to report bugs here:
http://lists.cpan.org/showlist.cgi?name=perl5-porters
and there (in FAQ) is recommended asking on the comp.lang.perl.misc or
comp.lang.perl.moderated,
I am asking here.
In perlop documentation,
- Regexp Quote-Like Operators
-- \G assertion
is this:
====START=OF=QUOTATION====
$_ = <<'EOL';
$url = URI::URL->new( "http://example.com/" ); die if $url eq
"xXx";
EOL
LOOP:
{
print(" digits"), redo LOOP if /\G\d+\b[,.;]?\s*/gc;
print(" lowercase"), redo LOOP if /\G[a-z]+\b[,.;]?\s*/gc;
print(" UPPERCASE"), redo LOOP if /\G[A-Z]+\b[,.;]?\s*/gc;
print(" Capitalized"), redo LOOP if /\G[A-Z][a-z]+\b[,.;]?\s*/gc;
print(" MiXeD"), redo LOOP if /\G[A-Za-z]+\b[,.;]?\s*/gc;
print(" alphanumeric"), redo LOOP if /\G[A-Za-z0-9]+\b[,.;]?\s*/
gc;
print(" line-noise"), redo LOOP if /\G[^A-Za-z0-9]+/gc;
print ". That's all!\n";
}
Here is the output (split into several lines):
line-noise lowercase line-noise lowercase UPPERCASE line-noise
UPPERCASE line-noise lowercase line-noise lowercase line-noise
lowercase lowercase line-noise lowercase lowercase line-noise
MiXeD line-noise. That's all!
=====END=OF=QUOTATION=====
I think it is wrong result
and my copy of this example gives me different result:
=====START=OF=MY=RESULT=====
line-noise lowercase line-noise UPPERCASE line-noise
UPPERCASE line-noise lowercase line-noise lowercase line-noise
lowercase lowercase line-noise lowercase lowercase line-noise
lowercase lowercase line-noise MiXeD line-noise. That's all!
======END=OF=MY=RESULT======
(I have older doc with "http://www/" and it seems to me wrong, too.)
Is it really a bug in doc?