substr documentation in perldoc



Hi,

Searching perldoc (Perl 5 version 14.1) for the built-in 'substr' function gives:

substr EXPR,OFFSET,LENGTH,REPLACEMENT
substr EXPR,OFFSET,LENGTH
substr EXPR,OFFSET

Extracts a substring out of EXPR and returns it. First character is at offset 0 ...

Is "0" a typo for "OFFSET" -- that is, should the first sentence be: "First character is at offset OFFSET..." -- or am I just confused?

Thanks,
Athanasius <°(((>< contra mundum

.



Relevant Pages

  • Re: substr documentation in perldoc
    ... substr EXPR,OFFSET,LENGTH ... Extracts a substring out of EXPR and returns it. ... First character is at ... character is at offset OFFSET..." ...
    (comp.lang.perl.misc)
  • Re: substr documentation in perldoc
    ... substr EXPR,OFFSET,LENGTH ... Extracts a substring out of EXPR and returns it. ... character is at offset OFFSET..." ... i.e. if you want to retrieve the first character of the original string, ...
    (comp.lang.perl.misc)
  • Re: if statement always evaluates to true
    ... to get the first character from a string: ... variable will return false in substr and thus trigger the if ...
    (comp.lang.php)
  • Re: Help: How to delete the first character from a line?
    ... So my problem is how use Perl to delete the first character of the first ... I would just use four-arg substr. ... Paul Lalli ...
    (comp.lang.perl.misc)
  • Re: Why doesnt this work?
    ... Hash: SHA1 ... > If I remove the substr, it works fine, but I just want to return the ... > first character. ... Can someone point out my syntax error? ...
    (comp.lang.perl.misc)