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 <jurgenex@xxxxxxxxxxx>
- Date: Thu, 20 Nov 2008 19:06:24 -0800
Peng Yu <PengYu.UT@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 am
unable to figure out how one could make it clearer:
Thank you the example. I see what it means. In general, I think the
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 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.
jue
.
- Follow-Ups:
- 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
- How to find all the strings in a long that are at most of n different characters of a test string?
- Prev by Date: Dose package name has to be the same as the filename? (for OO)
- Next by Date: Re: Dose package name has to be the same as the filename? (for OO)
- 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
|