Re: How to find all the strings in a long that are at most of n different characters of a test string?



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
.



Relevant Pages

  • Re: Slabinski and Mingst/Stowe disagree in Pushing Gravity
    ... Now provide the references to the postthat contain any ... Slabinki does a much more concise job than that page. ... absorbing energy at a rate that would be sufficient to vaporize the ... Earth in a fraction of a second. ...
    (sci.physics.relativity)
  • Re: Slabinski and Mingst/Stowe disagree in Pushing Gravity
    ... Now provide the references to the postthat contain any ... >> technical content of refutation. ... Slabinki does a much more concise job than that page. ...
    (sci.physics.relativity)
  • Re: How to find all the strings in a long that are at most of n different characters of a test strin
    ... It is a reference, concise and accurate, it is not ... something without making references to other concepts. ... But I think that the perldoc shall have as less ... cyclic references as possible. ...
    (comp.lang.perl.misc)
  • Re: Fewer convinced
    ... I know Malcolm doesn't think much of it but I think the references ... So how many of the references have you read, Angus? ... Are you also claiming that every quote from every reference is accurate? ... So what forefront are you at? ...
    (uk.environment.conservation)
  • Re: Fewer convinced
    ... So how many of the references have you read, ... Actually most of his writing is backed up by quotes from scientists. ... Are you also claiming that every quote from every reference is accurate? ... based on ignorance and prejudice and certainly not any knowledge. ...
    (uk.environment.conservation)