in reply to Re^2: OO Inline::C - returning $self not working
in thread OO Inline::C - returning $self not working

Thanks, but now that begs the question (from a newbie such as myself): If whitespace does not truly matter, how does the interpreter know when a line ends?
  • Comment on Re^3: OO Inline::C - returning $self not working

Replies are listed 'Best First'.
Re^4: OO Inline::C - returning $self not working
by PodMaster (Abbot) on Mar 08, 2006 at 14:57 UTC
    If whitespace does not truly matter, how does the interpreter know when a line ends?
    Because its not absolutely true. 'perldoc perlsyn'
    Perl is a free-form language, you can format and indent it however you
    like. Whitespace mostly serves to separate tokens, unlike languages like
    Python where it is an important part of the syntax.

    ...

    Text from a "#" character until the end of the line is a comment, and is
    ignored. Exceptions include "#" inside a string or regular expression.

    update: perldoc perlintro'
    Comments start with a hash symbol and run to the end of the line
    # This is a comment
    Whitespace is irrelevant:
    print "Hello, world" ;

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re^4: OO Inline::C - returning $self not working
by erroneousBollock (Curate) on Mar 09, 2006 at 02:54 UTC
    A 'line' ends when the parser hits a newline ("\n") char.
    Statements, declarations and expressions end in ways appropriate to their "type" and context.