Re: How to find all the strings in a long that are at most of n different characters of a test string?
- From: Peng Yu <PengYu.UT@xxxxxxxxx>
- Date: Thu, 20 Nov 2008 21:08:13 -0800 (PST)
On Nov 20, 9:06 pm, Jürgen Exner <jurge...@xxxxxxxxxxx> wrote:
Peng Yu <PengYu...@xxxxxxxxx> wrote:
On Nov 20, 3:46 pm, "A. Sinan Unur" <1...@xxxxxxxxxxxxxxxxxxx> wrote:
Peng Yu <PengYu...@xxxxxxxxx> wrote innews:8f31f2be-e332-4d6d-a5ad-337e18208809@xxxxxxxxxxxxxxxxxxxxxxxxxxx:
It seems that the perldoc is not easy to understand by a newbie.
It is a reference, concise and accurate (as much as possible), it is not
and never will be a tutorial.
While
it explains @-, the perldoc keeps on referring to others things that I
don't understand. Can somebody help explain @- for me with more
examples?
Then you will have to look for a tutorial or dig down into those other
things. Very often it is not possible or not desirable to explain
something without making references to other concepts. And @- is
certainly not the right place to explain grouping in regular
expressions.
I looked at the perldoc perlvar page to remind myself what it said. I amThank you the example. I see what it means. In general, I think the
unable to figure out how one could make it clearer:
document can be made easier to read with more examples.
But there are examples in that section:
<quote>
After a match against some variable $var:
"$`" is the same as "substr($var, 0, $-[0])"
"$&" is the same as "substr($var, $-[0], $+[0] - $-[0])"
"$'" is the same as "substr($var, $+[0])"
"$1" is the same as "substr($var, $-[1], $+[1] - $-[1])"
"$2" is the same as "substr($var, $-[2], $+[2] - $-[2])"
"$3" is the same as "substr $var, $-[3], $+[3] - $-[3])"
</quote>
I didn't understand the above examples because it refers to $-[0],
which was exactly what I wanted to understand.
I agree that adding more examples would make the manual to long to be
read by experts. But I think that this can be solved by having two
sets of document---one is with examples, the other is without
examples.
Go ahead and write the fivehundredandnintysecond tutorial about Perl.
You will find that either you are repeating yourself all over the place
or you start using references all over the place because Perl's concept
are so intertwined and cannot be explained stand-alone.
Not to mention the ensuing maintenance nightmare when you have to fix
something all over the place.
I agree your points. But I think that the perldoc shall have as less
cyclic references as possible. If the example that you mentioned in
the perldoc is not cyclic referred, it would easier to read.
Thanks,
Peng
.
- Follow-Ups:
- Re: How to find all the strings in a long that are at most of n different characters of a test string?
- From: Peter J. Holzer
- Re: How to find all the strings in a long that are at most of n different characters of a test string?
- From: A. Sinan Unur
- Re: How to find all the strings in a long that are at most of n different characters of a test string?
- From: Sherm Pendley
- Re: How to find all the strings in a long that are at most of n different characters of a test string?
- References:
- How to find all the strings in a long that are at most of n different characters of a test string?
- From: Peng Yu
- Re: How to find all the strings in a long that are at most of n different characters of a test string?
- From: sln
- Re: How to find all the strings in a long that are at most of n different characters of a test string?
- From: Peng Yu
- Re: How to find all the strings in a long that are at most of n different characters of a test string?
- From: John W. Krahn
- Re: How to find all the strings in a long that are at most of n different characters of a test string?
- From: Peng Yu
- Re: How to find all the strings in a long that are at most of n different characters of a test string?
- From: A. Sinan Unur
- Re: How to find all the strings in a long that are at most of n different characters of a test string?
- From: Peng Yu
- Re: How to find all the strings in a long that are at most of n different characters of a test string?
- From: Jürgen Exner
- How to find all the strings in a long that are at most of n different characters of a test string?
- Prev by Date: Re: How to find all the strings in a long that are at most of n different characters of a test string?
- Next by Date: Re: How to iterator array in order?
- Previous by thread: Re: How to find all the strings in a long that are at most of n different characters of a test string?
- Next by thread: Re: How to find all the strings in a long that are at most of n different characters of a test string?
- Index(es):
Relevant Pages
|