in reply to OO Inline::C - returning $self not working

I probably shouldn't even be attempting to offer anything, but I was just reading over your code and noticed: Don't you need to end (;) your comments? I don't think you had that done. --Even if i'm wrong and this sounds stupid, at least i'm learning. -keeps a positive attitude
  • Comment on Re: OO Inline::C - returning $self not working

Replies are listed 'Best First'.
Re^2: OO Inline::C - returning $self not working
by syphilis (Archbishop) on Mar 08, 2006 at 04:02 UTC
    No - a comment begins with the '#' and ends at the end of the line. (A semi-colon would be seen to be part of the comment.)

    Cheers,
    Rob
      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?
        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.

        A 'line' ends when the parser hits a newline ("\n") char.
        Statements, declarations and expressions end in ways appropriate to their "type" and context.